From 0d9a72ff5d870d72772f5f6b4b83b8ee0b4a1f05 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 25 Sep 2013 18:16:00 +0200 Subject: added unittests for rowspans at first table row --- _test/tests/inc/parser/parser_table.test.php | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to '_test/tests/inc/parser/parser_table.test.php') diff --git a/_test/tests/inc/parser/parser_table.test.php b/_test/tests/inc/parser/parser_table.test.php index 96789c38c..542a307b8 100644 --- a/_test/tests/inc/parser/parser_table.test.php +++ b/_test/tests/inc/parser/parser_table.test.php @@ -270,6 +270,64 @@ def'); ); $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } + + function testCellRowSpanFirstRow() { + $this->P->addMode('table',new Doku_Parser_Mode_Table()); + $this->P->parse(' +abc +|::: ^ d:::^:::| ::: | +| b ^ e | | ::: | +|c ^ ::: | |:::| +def'); + + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n\nabc")), + array('p_close',array()), + array('table_open',array(4, 3, 6)), + array('tablerow_open',array()), + array('tablecell_open',array(1,NULL,1)), + array('cdata',array('')), + array('tablecell_close',array()), + array('tableheader_open',array(1,'right',1)), + array('cdata',array(' d:::')), + array('tableheader_close',array()), + array('tableheader_open',array(1,NULL,1)), + array('cdata',array('')), + array('tableheader_close',array()), + array('tablecell_open',array(1,NULL,3)), + array('cdata',array('')), + array('tablecell_close',array()), + array('tablerow_close',array()), + array('tablerow_open',array()), + array('tablecell_open',array(1,NULL,1)), + array('cdata',array(' b ')), + array('tablecell_close',array()), + array('tableheader_open',array(1,'left',2)), + array('cdata',array(' e ')), + array('tableheader_close',array()), + array('tablecell_open',array(1,NULL,1)), + array('cdata',array(' ')), + array('tablecell_close',array()), + array('tablerow_close',array()), + array('tablerow_open',array()), + array('tablecell_open',array(1,'left',1)), + array('cdata',array('c ')), + array('tablecell_close',array()), + array('tablecell_open',array(1,NULL,1)), + array('cdata',array(' ')), + array('tablecell_close',array()), + array('tablerow_close',array()), + + array('table_close',array(69)), + array('p_open',array()), + array('cdata',array('def')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); + } function testCellAlignmentFormatting() { $this->P->addMode('table',new Doku_Parser_Mode_Table()); -- cgit v1.2.3