From: C. Scott Ananian Date: Wed, 8 Jul 2015 21:56:54 +0000 (-0400) Subject: Sync up with Parsoid parserTests. X-Git-Tag: 1.31.0-rc.0~10845^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=1c4a8ff314ae894a5dae23cd1c6b76b4e82bac49;p=lhc%2Fweb%2Fwiklou.git Sync up with Parsoid parserTests. This now aligns with Parsoid commit 34bd76a1747816ed96952ce81ce2fafa751dbb21 Change-Id: Iabf427db488251e26d55a0eb68b282eccd9eb8df --- diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 1670fe4cc5..b3944fb99f 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -118,6 +118,13 @@ Template:echo_with_div
{{{1}}}
!! endarticle +!! article +Template:blank_param +!! text +{{{1}}} +{{{}}} +!! endarticle + !! article Template:table_attribs !! text @@ -165,6 +172,13 @@ Template:table_cells {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz !! endarticle +!! article +Template:PartialTable +!! text +{| +|- +!! endarticle + !! article Template:image_attribs !! text @@ -1425,6 +1439,16 @@ parsoid=html2wt * </nowiki> tag !! end +!! test +T93824: Put escaped HTML tags inside nowiki +!! options +parsoid=html2wt +!! html +

<h2>foo</h2>

+!! wikitext +

foo

+!! end + !! test T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars !! options @@ -1483,6 +1507,30 @@ parsoid=html2wt {{echo|a }}} !! end +!! test +Cases where "!!" needs nowiki protection +!! options +parsoid=html2wt +!! html + + +
this needs protection !! here
+ + + +
this does not need +protection !! here
+!! wikitext +{| +!this needs protection !! here +|} + +{| +!this does not need +protection !! here +|} +!! end + ### ### Comments ### @@ -1587,8 +1635,10 @@ Comment whitespace Comment semantics and delimiters !! wikitext -!! html +!! html/php +!! html/parsoid + !! end !! test @@ -1596,8 +1646,11 @@ Comment semantics and delimiters, redux !! wikitext -!! html +!! html/php +!! html/parsoid + !! end !! test @@ -1607,39 +1660,68 @@ Comment semantics and delimiters: directors cut everything starting with < followed by !-- until the first -- and > we see, that wouldn't be valid XML however, since in XML -- has to terminate a comment -->--> -!! html +!! html/php

-->

+!! html/parsoid +

-->

!! end !! test Comment semantics: nesting !! wikitext --> -!! html +!! html/php

-->

+!! html/parsoid +

-->

!! end +# Parsoid closes the unclosed comment, even if it means a slight +# round-trip diff. !! test Comment semantics: unclosed comment at end +!! options +parsoid=wt2html,html2html !! wikitext !! end -# Bug 58184: document parsoid's behaviour !! test -Suppress comment closing tag in lenient browsers -!! options -parsoid=wt2html,html2html +Comment semantics: normalize comments to play nice with XML and browsers !! wikitext - think this is closed --> + think this is closed --> + This would normally be text --> + As would this --> + + +But this is not a comment. !! html/php +

But this is not a comment. +

+!! html/parsoid + + + + + +

But this is not a comment.

+!! end +!! test +Comment semantics: round-trip even text which contains encoded --> +!! wikitext + !! html/parsoid - + !! end !! test @@ -1683,9 +1765,10 @@ parsoid=wt2html,wt2wt *a *b !! html -