From ee8d2c461ba8e6f005e259573787c30a77d3528e Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Tue, 26 Jun 2018 10:37:51 -0400 Subject: [PATCH] Sync up with Parsoid parserTests.txt This now aligns with Parsoid commit b068bb51d29e294a4f4a875ae829cca8cf314205 Change-Id: Ie8e8a7ed631894f56372e286ed01d1583f7a8979 --- tests/parser/parserTests.txt | 1264 +++++++++++++++++++++++----------- 1 file changed, 870 insertions(+), 394 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index ce4df8597b..e06a732000 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -257,7 +257,7 @@ Weirdo titles! !!article Template:Bullet !!text -* Bar +*Bar !!endarticle !!article @@ -327,23 +327,31 @@ This is a simple paragraph. !! test Paragraphs with extra newline spacing !! wikitext -foo +a -bar +b (+2 nls) -baz +c (+3 nls) + + + +d (+4 nls) + -booz +e (+5 nls) !! html -

foo -

bar +

a +

b (+2 nls)


-baz +c (+3 nls)


-

booz +

d (+4 nls) +


+


+e (+5 nls)

!! end @@ -515,7 +523,6 @@ Extra newlines followed by heading a - =b= [[a]] @@ -534,19 +541,89 @@ a !! end !! test -Extra newlines between heading and content are swallowed +Extra newlines between heading and content are swallowed (Parsoid does not) !! wikitext =b= [[a]] -!! html +!! html/php+tidy

b[edit]

a

+!! html/parsoid +

b

+

+

+ +

a

+!! end + +!! test +Extra new lines before and after lists are preserved +!! wikitext +a + + +*b + + +c +!! html/php+tidy +

a +


+

+ +


+c +

+!! html/parsoid +

a

+

+

+ +

+
+c

!! end +# Parsoid regression test +!!test +Multiple newlines after tables are converted to p-br-p tags +!!options +parsoid=wt2html,wt2wt +!!wikitext +{| +|x +|} + + + + +=b= +!!html/php+tidy + + +
x +
+


+


+

+

b[edit]

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


+


+

b

+!!end + !! test Heading with line break in nowiki !! options @@ -2695,12 +2772,9 @@ parsoid=wt2html
x
<pre
!! html/parsoid -
x
- - -

<pre

+
x
-
+<pre
!! end !! test @@ -3311,6 +3385,57 @@ a !! end +!! test +2h. Indent pre in tables +!! options +parsoid=wt2html,html2html +!! wikitext +{| + ! + foo + ! + bar + |- + | + baz + {{!}} + bam + |} +!! html/php + + + + + + +
+
foo
+
+
+
bar
+
+
+
baz
+
+
+
bam
+
+
+ +!! html/parsoid + + +
+
foo
+
+
bar
+
+
baz
+
+
bam
+
+!! end + !!test 3a. Indent-Pre and block tags (single-line html) !! wikitext @@ -3338,24 +3463,24 @@ a !! end -!!test +!! test 3b. Indent-Pre and block tags (multi-line html) !! wikitext a foo - b
foo
-!! html + b
foo
+!! html/php
a foo
 
b
foo
!! html/parsoid
a foo
- b
foo
+

b

foo
!! html/php+tidy
a foo
 

b

foo
-!!end +!! end !!test 3c. Indent-Pre and block tags (pre-content on separate line) @@ -3802,7 +3927,7 @@ Definition list with bracketed URL link !! test Definition list with wikilink containing colon !! wikitext -; [[Help:FAQ]]:The least-read page on Wikipedia +;[[Help:FAQ]]:The least-read page on Wikipedia !! html
Help:FAQ
The least-read page on Wikipedia
@@ -3813,19 +3938,19 @@ Definition list with wikilink containing colon !! test Definition list with news link containing colon !! wikitext -;news:alt.wikipedia.rox: This isn't even a real newsgroup! +;news:alt.wikipedia.rox :This isn't even a real newsgroup! !! html/php -
news:alt.wikipedia.rox
+
news:alt.wikipedia.rox 
This isn't even a real newsgroup!
!! html/parsoid -
news:alt.wikipedia.rox
This isn't even a real newsgroup!
+
news:alt.wikipedia.rox
This isn't even a real newsgroup!
!! end !! test Malformed definition list with colon !! wikitext -; news:alt.wikipedia.rox -- don't crash or enter an infinite loop +;news:alt.wikipedia.rox -- don't crash or enter an infinite loop !! html
news:alt.wikipedia.rox -- don't crash or enter an infinite loop
@@ -4057,6 +4182,8 @@ should be left alone

!! test Definition Lists: Hacky use to indent tables, with comment before table +!!options +parsoid=wt2html !! wikitext ::{| |foo @@ -4072,7 +4199,7 @@ Definition Lists: Hacky use to indent tables, with comment before table !! test Definition Lists: Hacky use to indent tables (WS-insensitive) !! wikitext -: {| +:{| |a |} !! html/php @@ -4082,9 +4209,9 @@ Definition Lists: Hacky use to indent tables (WS-insensitive)
!! html/parsoid -
+
-
a
+ !! end ## The PHP parser treats : items (dd) without a corresponding ; item (dt) @@ -5020,7 +5147,7 @@ URL in text: [http://example.com http://example.com]

URL in text: http://example.com

!! html/parsoid -

URL in text: http://example.com

+

URL in text: http://example.com

!! end !! test @@ -5663,7 +5790,7 @@ Examples from RFC 2732, section 2: !! html/parsoid

http://[2404:130:0:1000::187:2]/index.php

-

Examples from RFC 2373, section 2.2:

+

Examples from RFC 2373, section 2.2:

-

Examples from RFC 2732, section 2:

+

Examples from RFC 2732, section 2: