Add two table parser tests
authorGabriel Wicke <gwicke@wikimedia.org>
Mon, 18 Mar 2013 22:26:00 +0000 (15:26 -0700)
committerGabriel Wicke <gwicke@wikimedia.org>
Mon, 18 Mar 2013 22:26:00 +0000 (15:26 -0700)
One tests paragraph wrapping inside of table cells, the other mixed wikitext /
html syntax tables in Parsoid only.

Change-Id: I1e07e868d7f329ac1fa5d33b7fa07c7e701f41ba

tests/parser/parserTests.txt

index e9218de..251bf23 100644 (file)
@@ -3311,6 +3311,43 @@ Wikitext table with a lot of comments
 
 !! end
 
+!! test
+Wikitext table with double-line table cell
+!! input
+{|
+|a
+b
+|}
+!! result
+<table>
+<tr>
+<td>a
+<p>b
+</p>
+</td></tr></table>
+
+!! end
+
+# The expected HTML structure in this test is debatable. The PHP parser does
+# not parse this kind of table at all. The main focus for Parsoid is on
+# round-tripping, so this output is ok for now. TODO: revisit!
+!! test
+Wikitext table with html-syntax row (Parsoid)
+!! options
+parsoid
+!! input
+{|
+|-
+<td>foo</td>
+|}
+!! result
+<table>
+<tbody>
+<tr>
+<td></td>
+<td>foo</td></tr></tbody></table>
+!! end
+
 ###
 ### Internal links
 ###