From 60ad62b807d795aecd52f946eaa58a9e50cf9f2c Mon Sep 17 00:00:00 2001
From: Arlo Breault
Date: Thu, 19 Feb 2015 15:16:58 -0800
Subject: [PATCH] Sync up with Parsoid parserTests.
This now aligns with Parsoid commit b3127b83a8923c7d73c7e00eb0c651e039b84521
Change-Id: I0d8160bc93e5912c2466d1a3051d2a69cca6c41a
---
tests/parser/parserTests.txt | 207 +++++++++++++++++++++++++++++++----
1 file changed, 187 insertions(+), 20 deletions(-)
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index e525cac08f..b85516c582 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -115,13 +115,27 @@ Template:echo_with_div
Template:table_attribs
!! text
-| style="color: red"| Foo
+|style="color:red;"|Foo
+!! endarticle
+
+!! article
+Template:table_attribs_2
+!! text
+
+| style="color:red;"|Foo
+|Bar||Baz
+!! endarticle
+
+!! article
+Template:table_header_cells
+!! text
+{{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
!! endarticle
!! article
Template:table_cells
!! text
-{{table_attribs}} || Bar || Baz
+{{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
!! endarticle
!! article
@@ -5636,7 +5650,7 @@ Indented table markup mixed with indented pre content (proposed in bug 6200)
!! end
!! test
-Template-generated table cell attributes and cell content
+1. Template-generated table cell attributes and cell content
!! wikitext
{|
|{{table_attribs}}
@@ -5648,33 +5662,67 @@ Template-generated table cell attributes and cell content
!! html
- Foo
+ Foo
- Foo
+ Foo
- Foo
+ Foo
- Foo
+ Foo
+
+Foo
+
+
+!! end
+
+!! test
+2. Template-generated table cell attributes and cell content
+!! wikitext
+{|
+|{{table_attribs_2}}
+|}
+!! html/php
+
+!! html/parsoid
+
!! end
!! test
-Template-generated table cell attributes and cell content (2)
+3. Template-generated table cell attributes and cell content
!! wikitext
{|
+!align=center {{table_header_cells}}
+|-
|align=center {{table_cells}}
|}
-!! html
+!! html/php
- Foo
- Bar
- Baz
+ Foo
+Bar
+Foo and Baz
+
+
+Foo
+Bar
+Foo and Baz
+!! html/parsoid
+
+Foo Bar Foo and Baz
+Foo Bar Foo and Baz
+
!! end
!! test
@@ -8829,14 +8877,20 @@ Aoeu
# From plwiki:PLOS_ONE
!! test
Parsoid: Page property magic word with magic word contents
-!! options
-parsoid
!! wikitext
{{DISPLAYTITLE:''{{PAGENAME}}''}}
-!! html
+!! html/parsoid
!! end
+!! test
+Parsoid: Template-generated DISPLAYTITLE
+!! wikitext
+{{{{echo|DISPLAYTITLE}}:Foo}}
+!! html/parsoid
+
+!! end
+
!! test
Namespace 1 {{ns:1}}
!! wikitext
@@ -13120,14 +13174,20 @@ parsoid=html2wt
!! test
Parsoid: Defaultsort
-!! options
-parsoid
!! wikitext
{{DEFAULTSORT:Foo}}
-!! html
+!! html/parsoid
!! end
+!! test
+Parsoid: Defaultsort (template-generated)
+!! wikitext
+{{{{echo|DEFAULTSORT}}:Foo}}
+!! html/parsoid
+
+!! end
+
###
### Inter-language links
###
@@ -19658,10 +19718,16 @@ parsoid
A [foo]
B [foo]
C
+
!! html
A [1]
B [2]
C [3]
+
+â foo
+â foo
+â
+
!!end
!!test
@@ -19671,9 +19737,13 @@ parsoid
!! wikitext
A [foo]
B
+
!! html
A [1]
B [1]
+
+â 1.0 1.1 foo
+
!!end
!!test
@@ -19684,10 +19754,14 @@ parsoid
A [foo]
B
C
+
!! html
A [1]
B [1]
C [1]
+
+â 1.0 1.1 1.2 foo
+
!!end
# NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
@@ -19697,8 +19771,12 @@ Ref: 4. 'constructor' should be accepted as a valid ref-name
parsoid
!! wikitext
A [foo]
+
!! html
A [1]
+
+â foo
+
!!end
!!test
@@ -19833,9 +19911,14 @@ parsoid
!! wikitext
A [foo] B
C [bar] D
+
!! html
A [1] B
C [2] D
+
+â foo
+â bar
+
!!end
!!test
@@ -19849,6 +19932,7 @@ b
c
+
!! html
a
@@ -19857,6 +19941,10 @@ c
[2]
c
+
+â
+â
+
!!end
!!test
@@ -19867,9 +19955,14 @@ parsoid
[foo] A
[bar
] B
+
!! html
[1] A
[2] B
+
+â foo
+â bar
+
!!end
!!test
@@ -19985,14 +20078,23 @@ parsoid
!! wikitext
A [foo]
B [bar]
+C [baz]
+
+
!! html
A [a 1]
-B [b 1]
+B [b 1]
+C [1]
â foo
+â baz
+
+
+â bar
+
!!end
!!test
@@ -20098,14 +20200,51 @@ B â foo
!! end
+!! test
+References: 8. T88019: Remove s from templates inside [ that's itself inside a template
+!! options
+parsoid
+!! wikitext
+X{{echo|][foo {{echo|]bar }} and {{echo|baz}} boo}}
+
+!! html
+X[1]
+â foo bar and baz boo
+!!end
+
+# This test only works in wt2html now as the are always generated
+# unless selser is active. Once T72722 is fixed, we should add a changes test
+# here to ensure that unrelated changes don't add the new in
+# wt2wt.
+!! test
+References: 9. Generate missing references list at the end
+!! options
+parsoid
+!! wikitext
+A [foo]
+B [bar]
+!! html
+A [1] B [inexistent 1]
+
+â foo
+
+
+â bar
+
+!! end
+
!! test
Entities in ref name
!! options
parsoid
!! wikitext
[hi]
+
!! html
[1]
+
+â hi
+
!! end
# This test is wt2html only because we're permitting the serializer to produce
@@ -21386,6 +21525,7 @@ parsoid=html2wt,wt2wt
'''foo'' [test]
'''foo'' test
'''foo'' and bar
+
!! html
'a foo bar
a' foo bar
@@ -21394,6 +21534,9 @@ parsoid=html2wt,wt2wt
'foo [1]
'foo test
'foo and bar
+
+â test
+
!! end
!! test
@@ -21507,8 +21650,12 @@ parsoid
!! wikitext
foo [''a''
b]
+
!! html
foo [1]
+
+â a b
+
!! end
!! test
@@ -22437,6 +22584,21 @@ parsoid=html2wt
[[Category:Toxine bactérienne]]
!! end
+!! test
+New sol transparent links don't need indent-pre nowiki protection
+!! options
+parsoid=html2wt
+language=de
+!! html
+
+
+
+!! wikitext
+ #WEITERLEITUNG [[Main Page]]
+ [[Category:Good]]
+ [[Kategorie:Great]]
+!! end
+
!! test
New interlanguage links (href variations)
!! options
@@ -22829,12 +22991,17 @@ parsoid=html2wt
!! html
hello there
hi pal
+
+ how goes it
!! wikitext
== hello there ==
[[Category:A1]]
[[Category:A2]]
== hi pal ==
+
+ [[Category:A3]]
+== how goes it ==
!! end
!! test
--
2.20.1