Merge "5 new tests (3 Parsoid serializer, 2 parser) & fixed 4 tests."
authorGWicke <gwicke@wikimedia.org>
Mon, 15 Apr 2013 16:46:32 +0000 (16:46 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 15 Apr 2013 16:46:32 +0000 (16:46 +0000)
tests/parser/parserTests.txt

index 1d4102c..540b6f4 100644 (file)
@@ -3751,7 +3751,6 @@ parsoid
 <table>
 <tbody>
 <tr>
-<td></td>
 <td>foo</td></tr></tbody></table>
 !! end
 
@@ -4467,7 +4466,7 @@ Horizontal ruler -- eats additional dashes on the same line
 !! end
 
 !! test
-Horizontal ruler -- does not collaps dashes on consecutive lines
+Horizontal ruler -- does not collapse dashes on consecutive lines
 !! input
 ----
 ----
@@ -11743,6 +11742,27 @@ bar
 </pre>
 !! end
 
+!!test
+Parsing of overlapping (improperly nested) inline html tags (PHP parser)
+!!options
+php
+!!input
+<span><s>x</span></s>
+!!result
+<p><span><s>x&lt;/span&gt;</s></span>
+</p>
+!!end
+
+!!test
+Parsing of overlapping (improperly nested) inline html tags (Parsoid)
+!!options
+parsoid
+!!input
+<span><s>x</span></s>
+!!result
+<p><span><s>x</s></span><s></s>
+</p>
+!!end
 
 ###
 ### Language variants related tests
@@ -14505,7 +14525,7 @@ RT-ed inter-element separators should be valid separators
 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
 (Parsoid-only since PHP parser relies on Tidy for correct output)
 !!options
-disabled parsoid
+parsoid
 !!input
 {|
 |<small>foo
@@ -14537,11 +14557,30 @@ Empty TD followed by TD with tpl-generated attribute
 
 !!end
 
+!!test
+Indented table with an empty td
+!!input
+ {|
+ |-
+ |
+ |foo
+ |}
+!!result
+<table>
+
+<tr>
+<td>
+</td>
+<td>foo
+</td></tr></table>
+
+!!end
+
 !!test
 Empty TR followed by a template-generated TR
 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
 !!options
-disabled parsoid
+parsoid
 !!input
 {|
 |-
@@ -14551,11 +14590,35 @@ disabled parsoid
 <table>
 <tbody>
 <tr>
-<td></td></tr>
+</tr>
 <tr>
 <td>foo</td></tr></tbody></table>
 !!end
 
+## PHP and parsoid output differ for this, and since this is primarily
+## for testing Parsoid's serializer, marking this Parsoid only
+!!test
+Empty TR followed by mixed-ws-comment line should RT correctly
+!!options
+parsoid
+!!input
+{|
+|-
+ <!--c-->
+|-
+<!--c--> <!--d-->
+|}
+!!result
+<table>
+<tbody>
+<tr>
+<td> <!--c--></td></tr>
+<tr>
+<td><!--c--> <!--d--></td></tr>
+</table>
+
+!!end
+
 !!test
 Multi-line image caption generated by templates with/without trailing newlines
 !!options
@@ -14569,6 +14632,21 @@ parsoid
 
 !!end
 
+## PHP emits broken html for this, and since this is primarily
+## a Parsoid serializer test, marking this Parsoid only
+!!test
+Improperly nested inline or quotes tags with whitespace in between
+!!options
+parsoid
+!!input
+<span> <s>x</span> </s>
+''' ''x''' ''
+!!result
+<p><span> <s>x</s></span><s> </s>
+<b> <i>x</i></b><i> </i></span>
+</p>
+!!end
+
 TODO:
 more images
 more tables