From d4128daa22e4c67d5a727054e75c4db2dbbc5cc3 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 27 Jun 2013 14:46:20 -0700 Subject: [PATCH] Sync up with Parsoid tests Change-Id: Id1d80a581564d0365c04953da4f41b086a2bc0d8 --- tests/parser/parserTests.txt | 150 ++++++++++++++++++++++++++++++++++- 1 file changed, 146 insertions(+), 4 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 468ebb63f3..17f9437e21 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1515,6 +1515,17 @@ Templates: Strip whitespace from named parameters, but not positional ones !! end +!! test +Templates: Parsoid parameter escaping test 1 +!! options +parsoid +!! input +{{echo|[foo]|{{echo|[bar]}}}} +!! result +

[foo]

+!! end + ### ### Parsoid-centric tests for testing RT edge cases for pre ### @@ -4543,6 +4554,84 @@ language=ln

!! end +!! test +Parsoid: handle constructor well +!! options +parsoid +!! input +[[constructor]] + +[[constructor:foo]] +!! result +

constructor

+ + +

constructor:foo

+!! end + +## +## Redirects, Parsoid-only +## +!! test +Simple redirect to page +!! options +parsoid +!! input +#REDIRECT [[Main Page]] +!! result + +!! end + +!! test +Redirect to category +!! options +parsoid=wt2html +!! input +#REDIRECT [[Category:Foo]] +!! result + +!! end + +!! test +Redirect to category page +!! options +parsoid=wt2html,html2html +!! input +#REDIRECT [[:Category:Foo]] +!! result +

Category:Foo

+!! end + +!! test +Redirect to image page +!! options +parsoid +!! input +#REDIRECT [[File:Wiki.png]] +!! result + +!! end + +!! test +Redirect to language +!! options +parsoid +!! input +#REDIRECT [[en:File:Wiki.png]] +!! result + +!! end + +!! test +Redirect to interwiki +!! options +parsoid +!! input +#REDIRECT [[meatball:File:Wiki.png]] +!! result + +!! end + ## ## XHTML tidiness ### @@ -8140,7 +8229,7 @@ parsoid -
caption content
+
caption content
!! end @@ -8155,7 +8244,7 @@ parsoid -
caption
+
caption
!! end @@ -8170,7 +8259,7 @@ parsoid -
caption
+
caption
!! end @@ -8185,7 +8274,7 @@ parsoid -
caption
+
caption
!! end @@ -8435,6 +8524,48 @@ Bar

!! end +!! test +Parsoid: Serialize link to category page with colon escape +!! options +parsoid +!! input + +[[:Category:Foo]] +[[:Category:Foo|Bar]] +!! result +

+Category:Foo +Bar +

+!! end + +!! test +Parsoid: Serialize link to file page with colon escape +!! options +parsoid +!! input + +[[:File:Foo.png]] +[[:File:Foo.png|Bar]] +!! result +

+File:Foo.png +Bar +

+!! end + +!! test +Parsoid: Serialize a genuine category link without colon escape +!! options +parsoid +!! input +[[Category:Foo]] +[[Category:Foo|Bar]] +!! result + + +!! end + ### ### Inter-language links ### @@ -14596,6 +14727,13 @@ Headings: 6a. Heading chars in SOL context (with trailing spaces) !! options parsoid !! input +=a= + +=a= + +=a= + +=a= !! result

=a=

=a=

@@ -15164,18 +15302,22 @@ parsoid '''foo''' ''''foo'''' '''''foo''''' +''foo'''s ''''foo'''' '''''foo''''' ''''''foo'''''' '''foo'''bar'''baz''' +'''foo''''s !! result

'foo' ''foo'' '''foo''' +foo's 'foo' ''foo'' '''foo''' foo'bar'baz +foo's

!! end -- 2.20.1