From cd9ad736027025a784499807668da50865ec18eb Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Thu, 18 Jul 2013 17:33:12 -0400 Subject: [PATCH] Sync up with Parsoid parserTests. This now aligns with Parsoid commit f5aa9efaee28d5b6571838e45879afdc8d4046eb Change-Id: I709da355b1f24ba013d002c913bc69c1c2a19d52 --- tests/parser/parserTests.txt | 223 ++++++++++++++++++++--------------- 1 file changed, 130 insertions(+), 93 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 93377c2e4d..e1f2370caa 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1609,8 +1609,13 @@ Templates: Dont escape already nowiki-escaped text in template parameters parsoid=html2wt,wt2wt !! input {{echo|foo|bar}} +{{echo|<div>}} +{{echo|}} !! result -

foo|bar

+

foo|bar +<div> + +

!! end ### @@ -5183,73 +5188,6 @@ Nested lists 8 (multiple nesting transitions) !! end -!! test -Unbalanced closing block tags break a list -(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up) -!! options -parsoid -!! input -
-*a
-*b
-!! result -
-
-
-!! end - -!! test -Unbalanced closing non-block tags don't break a list -(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up) -!! options -parsoid -!! input - -*a -*b -!! result -

-

- -!! end - -!! test -Unclosed formatting tags that straddle lists are closed and reopened -(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up) -!! options -parsoid -!! input -# a -# b -!! result -
  1. a -
  2. b -
-!! end - -!!test -List embedded in a non-block tag -(Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy) -!! options -parsoid -!!input - -* foo - -!!result -

- - - -

-!!end - !! test List items are not parsed correctly following a
 block (bug 785)
 !! input
@@ -5391,6 +5329,77 @@ parsoid
 
  1. foo
    1. bar
foo
bar
!! end +# ------------------------------------------------------------------------ +# The next set of tests are about Parsoid's ability to handle badly nested +# tags (parse, minimize scope of fixup, and roundtrip back) +# ------------------------------------------------------------------------ + +!! test +Unbalanced closing block tags break a list +(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up) +!! options +parsoid +!! input +
+*a
+*b
+!! result +
+
  • a +
+
  • b +
+!! end + +!! test +Unbalanced closing non-block tags don't break a list +(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up) +!! options +parsoid +!! input + +*a +*b +!! result +

+

+ +!! end + +!! test +Unclosed formatting tags that straddle lists are closed and reopened +(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up) +!! options +parsoid +!! input +# a +# b +!! result +
  1. a +
  2. b +
+!! end + +!!test +List embedded in a non-block tag +(Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy) +!! options +parsoid +!!input + +* foo + +!!result +

+ +
    +
  • foo
  • +
+
+

+!!end ### ### Magic Words @@ -8789,6 +8798,17 @@ parsoid

!! end +!! test +Parsoid: Link prefix/suffixes aren't applied to category links +!! options +parsoid=wt2html,wt2wt,html2html +language=is +!! input +x[[Category:Foo]]y +!! result +

xy

+!! end + !! test Parsoid: Serialize link to file page with colon escape !! options @@ -14805,9 +14825,10 @@ parsoid !!result -

[1] baz</ref>

+[1] -
  1. ↑ foo <ref>bar
+
    +
  1. ↑ foo <ref>bar</ref> baz
!!end !!test @@ -15002,7 +15023,7 @@ Headings: 2. Outside heading nest on a single line

foo

*bar parsoid !! input =foo= -*bar +*bar =foo= =bar @@ -15103,11 +15124,11 @@ parsoid !! input =a= -=a= +=a= -=a= +=a= -=a= +=a= !! result

=a=

=a=

@@ -15148,8 +15169,8 @@ Headings: 6c. Heading chars in SOL context (leading newline break) !! options parsoid !! input -a -=b= +a +=b= !! result

a =b=

@@ -15162,7 +15183,7 @@ parsoid !! input =a= -=a= +=a= !! result

=a=

=a=

@@ -15192,9 +15213,9 @@ parsoid=html2wt !! test Lists: 0. Outside nests !! input -*foo +*foo -#foo +#foo !! result

*foo

#foo @@ -15339,8 +15360,8 @@ parsoid !! test Lists: 7. Escape bullets in a multi-line context !! input -a -*b +a +*b !! result

a *b @@ -15598,7 +15619,7 @@ Links 1. Quote marks in link text !! options parsoid !! input -[[Foo|Foo''boo'']] +[[Foo|Foo''boo'']] !! result Foo''boo'' !! end @@ -15754,24 +15775,24 @@ bar [[foo]] !! options parsoid !! input - a + a - a + a - a(tab) + a(tab) - a + a - a + a -a - b +a + b -a - b +a + b -a - b +a + b !! result

a

a

@@ -16248,6 +16269,22 @@ parsoid=html2wt !! end +!! test +Parsoid: Serialize positional parameters with = in them as named parameter +!! options +parsoid=html2wt +!! input +{{echo|1 = f=oo}} +!! result +

foo

+!! end + +# ----------------------------------------------------------------- +# End of section for Parsoid-only html2wt tests for serialization +# of new content +# ----------------------------------------------------------------- TODO: more images -- 2.20.1