GWicke has submitted this change and it was merged.
Change subject: 5 new tests (3 Parsoid serializer, 2 parser) & fixed 4 tests.
......................................................................
5 new tests (3 Parsoid serializer, 2 parser) & fixed 4 tests.
* Updated html output of two parsoid-centric tests to reflect
changes in parsoid output.
* Updated 'disabled parsoid' options on two tests to 'parsoid'.
* Added three more tests for the Parsoid serializer.
* Added two tests documenting differences in PHP and Parsoid
output for overlapping HTML tags (sometimes seen on wikipedia
pages).
Change-Id: Id72fc5de5a09490028b64a522db3461970008960
---
M tests/parser/parserTests.txt
1 file changed, 83 insertions(+), 5 deletions(-)
Approvals:
GWicke: Verified; Looks good to me, approved
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 0165cb2..809e3d6 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -3530,7 +3530,6 @@
<table>
<tbody>
<tr>
-<td></td>
<td>foo</td></tr></tbody></table>
!! end
@@ -4246,7 +4245,7 @@
!! end
!! test
-Horizontal ruler -- does not collaps dashes on consecutive lines
+Horizontal ruler -- does not collapse dashes on consecutive lines
!! input
----
----
@@ -11510,6 +11509,27 @@
</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</span></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
@@ -14272,7 +14292,7 @@
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
@@ -14305,10 +14325,29 @@
!!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
{|
|-
@@ -14318,9 +14357,33 @@
<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
@@ -14336,6 +14399,21 @@
!!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
--
To view, visit https://gerrit.wikimedia.org/r/57079
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id72fc5de5a09490028b64a522db3461970008960
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits