From 13a85541fccca12ead97c0bb393b505c201f4f59 Mon Sep 17 00:00:00 2001
From: Subramanya Sastry
Date: Tue, 19 Aug 2014 16:19:24 -0500
Subject: [PATCH] Sync up with Parsoid parserTests.
This now aligns with Parsoid commit 13c31fc815749a6239dd357672d39de0a51d51ce
Change-Id: I929e1c195801a9055ad2847994e050836262a896
---
tests/parser/parserTests.txt | 187 +++++++++++++++++++++++++----------
1 file changed, 135 insertions(+), 52 deletions(-)
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 08637c6b0b..1d17fc4379 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -4357,7 +4357,7 @@ External links: wiki links within external link (Bug 3695)
wikilink embedded in ext link
!! html/parsoid
-wikilink embedded in ext link
+wikilink embedded in ext link
!! end
!! test
@@ -4590,7 +4590,7 @@ External link containing double-single-quotes with no space separating the url f
!! html/php+tidy
La muerte de Casagemas (1901) en el sitio de Museo Picasso .
!! html/parsoid
-La muerte de Casagemas (1901) en el sitio de Museo Picasso .
+La muerte de Casagemas (1901) en el sitio de Museo Picasso .
!! end
!! test
@@ -5847,7 +5847,7 @@ Piped link with multiple pipe characters in link text
|The|Main|Page|
!! html/parsoid
-|The|Main|Page|
+|The|Main|Page|
!! end
!! test
@@ -5992,7 +5992,7 @@ Anchor containing a #. (bug 63430)
Main Page#And#Link
!! html/parsoid
-Main Page#And#Link
+Main Page#And#Link
!! end
!! test
@@ -6038,7 +6038,7 @@ parsoid=html2wt,html2html
!! wikitext
[[MemoryAlpha:AlphaTest]]
!! html
-MemoryAlpha:AlphaTest
+
MemoryAlpha:AlphaTest
!! end
@@ -6074,7 +6074,7 @@ Link containing % (not as a hex sequence)
7% Solution
!! html/parsoid
-7% Solution
+7% Solution
!! end
# note that the parsoid HTML is identical to the previous test output,
@@ -6090,7 +6090,7 @@ parsoid=wt2wt,wt2html,html2html
7% Solution
!! html/parsoid
-7% Solution
+7% Solution
!!end
!! test
@@ -6113,7 +6113,7 @@ Example for such a section: == < ==
#< #>
!! html/parsoid
-#< #>
+#< #>
!! end
!! test
@@ -6133,7 +6133,7 @@ Link containing an equals sign
Special:BookSources/isbn=4-00-026157-6
!! html/parsoid
-Special:BookSources/isbn=4-00-026157-6
+Special:BookSources/isbn=4-00-026157-6
!! end
!! article
@@ -6153,7 +6153,7 @@ Link containing a tilde
Foo~bar
!! html/parsoid
-Foo~bar
+Foo~bar
!! end
!! test
@@ -6164,7 +6164,7 @@ Link containing double-single-quotes '' (bug 4598)
Lista d''e paise d''o munno
!! html/parsoid
-Lista d''e paise d''o munno
+Lista d''e paise d''o munno
!! end
!! test
@@ -6175,7 +6175,7 @@ Some [[Link|pretty ''italics'' and stuff]]!
Some pretty italics and stuff !
!! html/parsoid
-Some pretty italics and stuff !
+Some pretty italics and stuff !
!! end
!! test
@@ -6205,9 +6205,9 @@ Link with double quotes in title part (literal) and alternate part (interpreted)
!! html/parsoid
-''Pentecoste''
-Pentecoste
-Pentecoste
+''Pentecoste''
+Pentecoste
+Pentecoste
!! end
!! test
@@ -6308,7 +6308,7 @@ BUG 2: [[page|http://url/]] should link to page, not http://url/
http://url/
!! html/parsoid
-http://url/
+http://url/
!! end
# Parsoid does not mark self-links, by design.
@@ -6324,7 +6324,7 @@ title=[[Bug462]]
!! html/php+tidy
Bug462 Bug462
!! html/parsoid
-Bug462 Bug462
+Bug462 Bug462
!! end
!! test
@@ -6447,7 +6447,7 @@ Link with multiple ":" in a subpage-supporting namespace (bug 63636)
Test
!! html/parsoid
-Test
+Test
!! end
!! test
@@ -6470,7 +6470,7 @@ parsoid
!! wikitext
{{echo|[[Foo]]}}l
!! html
-Fool
+Fool
!! end
!! test
@@ -6480,7 +6480,7 @@ parsoid
!! wikitext
{{echo|Some [[Fool]]}}s
!! html
-Some Fools
+Some Fools
!! end
!! test
@@ -6490,7 +6490,7 @@ parsoid
!! wikitext
{{echo|Some [[Fool]]s are '''bold and foolish'''}}
!! html
-Some Fools are bold and foolish
+Some Fools are bold and foolish
!! end
!! article
@@ -6542,7 +6542,7 @@ parsoid=html2wt,html2html
!! wikitext
[[apple]] s
!! html
-apple s
+apple s
!! end
!! test
@@ -6553,7 +6553,7 @@ parsoid=html2wt,html2html
!! wikitext
Aðrir mótmælenda [[söfnuður]]
!! html
-Aðrir mótmælendasöfnuður
+Aðrir mótmælendasöfnuður
!! end
!! test
@@ -6581,7 +6581,7 @@ parsoid
!! wikitext
[[Foo|{{echo|a}} b {{echo|c}}]]
!! html
-a b c
+a b c
!! end
!! test
@@ -6592,7 +6592,7 @@ Link with angle bracket after anchor
Foo#<bar>
!! html/parsoid
-Foo#<bar>
+Foo#<bar>
!! end
###
@@ -6657,6 +6657,8 @@ Different interwiki prefixes mapping to the same URL
[[wikipedia:en:Foo]]
[[:wikipedia:en:Foo]]
+
+[[ wikiPEdia :Foo]]
!! html/parsoid
en:Foo
@@ -6669,6 +6671,8 @@ Different interwiki prefixes mapping to the same URL
wikipedia:en:Foo
wikipedia:en:Foo
+
+ wikiPEdia :Foo
!! end
!! test
@@ -6782,6 +6786,21 @@ Blah blah blah
!! end
+!! test
+Interlanguage link variations
+!! wikitext
+Blah blah blah
+[[ es :Spanish]]
+[[ ZH :Chinese]]
+!! html/php
+Blah blah blah
+
+!! html/parsoid
+Blah blah blah
+
+
+!! end
+
!! test
Interlanguage link, with prefix links
!! options
@@ -6860,9 +6879,9 @@ parsoid
[[constructor:foo]]
!! html
-
constructor
+constructor
-constructor:foo
+constructor:foo
!! end
!! test
@@ -6892,7 +6911,7 @@ parsoid
!! wikitext
[[en:Foo]]
!! html
-Foo
+Foo
!! end
!! test
@@ -7021,7 +7040,7 @@ parsoid=wt2html,html2html
!! wikitext
#REDIRECT [[:Category:Foo]]
!! html
-Category:Foo
+Category:Foo
!! end
!! test
@@ -7181,7 +7200,7 @@ Handling html with a br self-closing tag
-!! html
+!! html/php
@@ -7189,6 +7208,14 @@ Handling html with a br self-closing tag
+!! html/parsoid
+
+
+
+
+
+
+
!! end
!! test
@@ -8550,6 +8577,14 @@ Template with invalid target containing wikilink
{{ Main Page }}
!! end
+!! test
+Template with just whitespace in it, bug #68421
+!! wikitext
+{{echo|{{ }}}}
+!! html/parsoid
+{{ }}
+!! end
+
!! article
Template:test
!! text
@@ -9526,6 +9561,17 @@ Templates: Block Tags: 2. Back-to-back template uses
!!end
+# This is an edge case relating to paragraph wrapping.
+!!test
+Templates: Correctly encapsulate templates producing tag without a corresponding tag
+!! wikitext
+{{echo|a
+b
}}
+!! html/parsoid
+a
+b
+!!end
+
!!test
Templates: Links: 1. Simple example
!! wikitext
@@ -10856,9 +10902,9 @@ thumbsize=220
!! html/parsoid
-Caption Link1
+Caption Link1
[[]]
-Link2
+Link2
!! end
@@ -11241,7 +11287,7 @@ parsoid=wt2html,wt2wt,html2html
!! html/parsoid
-This is a test image Main Page
+This is a test image Main Page
!! end
!! test
@@ -11254,7 +11300,7 @@ parsoid=wt2html,wt2wt,html2html
!! html/parsoid
-This is a test image Main Page
+This is a test image Main Page
!! end
!! test
@@ -11669,7 +11715,7 @@ parsoid=wt2html,wt2wt,html2html
[[Image:Foobar.jpg|thumb|This is a broken caption. But this is just an ordinary link.
!! html/parsoid
-[[Image:Foobar.jpg|thumb|This is a broken caption. But this is just an ordinary link.
+[[Image:Foobar.jpg|thumb|This is a broken caption. But this is just an ordinary link.
!! end
!! test
@@ -12131,8 +12177,8 @@ subpage title=[[Subpage test/1/2/3/4]]
[[../../subpage]]
!! html
-subpage
-Subpage_test/1/2/subpage
+subpage
+Subpage_test/1/2/subpage
!! end
!! test
@@ -12401,8 +12447,8 @@ parsoid
[[:Category:Foo|Bar]]
!! html
-Category:Foo
-Bar
+Category:Foo
+Bar
!! end
@@ -12427,8 +12473,8 @@ parsoid
[[:File:Foo.png|Bar]]
!! html
-File:Foo.png
-Bar
+File:Foo.png
+Bar
!! end
@@ -13074,6 +13120,31 @@ parsoid
!! end
+!! test
+div with multiple empty attribute values
+!! options
+parsoid
+!! wikitext
+HTML rocks
+!! html
+HTML rocks
+
+!! end
+
+!! test
+table with multiple empty attribute values
+!! options
+parsoid
+!! wikitext
+{| title= id=
+| hi
+|}
+!! html
+
+!! end
+
# The PHP parser escapes the opening brace to { for some reason, so
# disabled this test for it.
!! test
@@ -13456,7 +13527,7 @@ Bug 2095: link with three closing brackets
Main Page ]
!! html/parsoid
-Main Page ]
+Main Page ]
!! end
!! test
@@ -13467,7 +13538,7 @@ Bug 2095: link with pipe and three closing brackets
link ]
!! html/parsoid
-link ]
+link ]
!! end
!! test
@@ -13478,7 +13549,7 @@ Bug 2095: link with pipe and three closing brackets, version 2
[http://example.com/]
!! html/parsoid
-[http://example.com/]
+[http://example.com/]
!! end
@@ -13513,13 +13584,16 @@ Bug 2304: HTML attribute safety (safe template; regression bug 2309)
!! end
+# Parsoid has enough context to handle this case
!! test
Bug 2304: HTML attribute safety (dangerous template; 2309)
!! wikitext
-!! html
+!! html/php
+!! html/parsoid
+
!! end
!! test
@@ -18777,10 +18851,10 @@ A [
]
!! html
-A [1]
+A [1]
-â This is a bolded link and this is a transclusion
+â This is a bolded link and this is a transclusion
!!end
@@ -19526,11 +19600,11 @@ parsoid
!!end
@@ -19821,7 +19895,7 @@ parsoid
|}
!! html
@@ -20430,9 +20504,12 @@ HTML tag with 'unnecessary' entity encoding in attributes
HTML tag with broken attribute value quoting
!! wikitext
Foo
+
!! end
!! test
@@ -20452,12 +20529,18 @@ Table with broken attribute value quoting
{|
| title="Hello world|Foo
|}
-!! html
+!! html/php
+!! html/parsoid
+
+
!! end
!! test
--
2.20.1