From: Arlo Breault
Date: Tue, 10 Nov 2015 00:56:48 +0000 (-0800)
Subject: Sync up with Parsoid parserTests.
X-Git-Tag: 1.31.0-rc.0~9040^2
X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=1f08236b978afdc59aae75a8cc67ee1b20ae1489;p=lhc%2Fweb%2Fwiklou.git
Sync up with Parsoid parserTests.
This now aligns with Parsoid commit b869b084be641d0e2150648ea926ca974590e6e3
Change-Id: I3e8ebd578db8b6630d23ebbdedb5036fa5a092e5
---
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index c127be2705..58860e98fe 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -14,9 +14,8 @@
# Plus any combination of these:
#
# cat add category links
-# (ignored by Parsoid, since it emits s)
# ill add inter-language links
-# (ignored by Parsoid, since it emits s)
+# (ignored by Parsoid, since it emits s)
# subpage enable subpages (disabled by default)
# noxml don't check for XML well-formedness
# title=[[XXX]] run test using article title XXX
@@ -3330,18 +3329,14 @@ parsoid=wt2html,wt2wt
!! end
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize all categories to serialize on their own line.
-## This wikitext usage is going to be fairly uncommon in production and
-## selser will take care of preserving formatting in those scenarios.
!! test
7b. Indent-pre and category links
!! options
-parsoid=wt2html
+parsoid=wt2html,wt2wt
!! wikitext
[[Category:foo]] a
[[Category:foo]] {{echo|b}}
-!! html/parsoid
+!! html
a
b
!! end
@@ -10865,14 +10860,8 @@ Un-closed
!! html
!! end
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize the include directives to serialize on their own line.
-## Selser will take care of preserving formatting in scenarios where they
-## intermingled with other wikitext.
!! test
Includes and comments at SOL
-!! options
-parsoid=wt2html,html2html
!! wikitext
== hu ==
@@ -11053,14 +11042,10 @@ parsoid=wt2html,wt2wt
!!end
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize the include directives to serialize on their own line.
-## Selser will take care of preserving formatting in scenarios where they
-## intermingled with other wikitext.
!!test
2. Table tag in SOL posn. should get reparsed correctly with valid TSR
!!options
-parsoid=wt2html
+parsoid=wt2html,wt2wt
!!wikitext
a{| {{{b}}}
|c
@@ -14275,22 +14260,15 @@ pst
[[Category:Foo (bar)|Foo]]
!! end
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize all categories to serialize on their own line.
-## This wikitext usage is going to be fairly uncommon in production and
-## selser will take care of preserving formatting in those scenarios.
!! test
Category with link tail
!! options
cat
pst
-parsoid=wt2html
!! wikitext
123[[Category:Foo]]456
-!! html/php
+!! html
123[[Category:Foo]]456
-!! html/parsoid
-
123456
!! end
!! test
@@ -14326,14 +14304,8 @@ pst
[[Category:{{echo|Foo}}|{{echo|Bar}}]]
!! end
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize all categories to serialize on their own line.
-## This wikitext usage is going to be fairly uncommon in production and
-## selser will take care of preserving formatting in those scenarios.
!! test
Category / paragraph interactions
-!! options
-parsoid=wt2html
!! wikitext
Foo [[Category:Baz]] Bar
@@ -14360,7 +14332,7 @@ Bar
[[Category:Baz]]
{{echo|[[Category:Baz]]}}
[[Category:Baz]]
-!! html/php
+!! html
Foo Bar
Foo
Bar
@@ -14370,32 +14342,20 @@ Bar
Foo
Bar
-!! html/parsoid
-
Foo Bar
-
Foo Bar
-
Foo Bar
-
Foo Bar
-
Foo Bar
-
!! end
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize all categories to serialize on their own line.
-## This wikitext usage is going to be fairly uncommon in production and
-## selser will take care of preserving formatting in those scenarios.
-##
## The whitespace on the empty line is part of the test. Please do not delete
!! test
1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
!! options
-parsoid=wt2html
+parsoid=wt2html,wt2wt
!! wikitext
This
[[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
{{echo|[[Category:Foo]] and so should this!}}
-!! html/php
+!! html
This and this should be part of same paragraph (not an indent-pre) and so should this!
!! html/parsoid
@@ -14493,14 +14453,8 @@ parsoid=wt2html
!! end
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize all categories to serialize on their own line.
-## This wikitext usage is going to be fairly uncommon in production and
-## selser will take care of preserving formatting in those scenarios.
!! test
6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
-!! options
-parsoid=wt2html
!! wikitext
* a [[Category:Foo]]
!! html/parsoid
@@ -14516,7 +14470,7 @@ parsoid=wt2html
* {{echo|a
[[Category:Foo]]}}
!! html/parsoid
-
a
+
a
!! end
@@ -14551,20 +14505,13 @@ parsoid
!! end
-# We used to, but no longer wt2wt this test since the default serializer
-# will normalize all categories to serialize on their own line.
-# This wikitext usage is going to be fairly uncommon in production and
-# selser will take care of preventing whitespace insertion if this
-# occurs in an article.
-#
-# html2html disabled for the same reason (whitespace insertion between
-# x and y).
-#
-# html2wt disabled because it localizes the "Category" namespace.
+# html2wt localizes the "Category" namespace.
+# XXX the element needs an empty data-parsoid attribute, or
+# else the html2html test fails because spaces are inserted.
!! test
Link prefix/suffixes aren't applied to category links
!! options
-parsoid=wt2html
+parsoid=wt2html,wt2wt,html2html
language=is
!! wikitext
x[[Category:Foo]]y
@@ -19264,25 +19211,17 @@ Category:åé¡
blah
!! endarticle
-## We used to, but no longer wt2wt this test since the default serializer
-## will normalize all categories to serialize on their own line.
-## This wikitext usage is going to be fairly uncommon in production and
-## selser will take care of preserving formatting in those scenarios.
!! test
Don't convert blue categorylinks to another variant (bug 33210)
!! options
-cat
-language=zh
-parsoid=wt2html
+language=zh cat
!! wikitext
[[A]][[Category:åç±»]]
-!! html/php
+!! html
åç±»
-!! html/parsoid
-
-
!! end
+
!! test
Stripping -{}- tags (language variants)
!! options
@@ -23281,7 +23220,7 @@ parsoid=html2wt
this is not a link: http://example.com
!! wikitext
-this is not a link: http://example.com
+this is not a link: http://example.com
!! end
!! test
@@ -23626,8 +23565,7 @@ parsoid=html2wt
__TOC__ foo
-__TOC__
- bar
+__TOC__ bar
!! end
#### --------------- HTML tags ---------------
@@ -25433,7 +25371,7 @@ parsoid=html2wt
!! html/parsoid
http://example.com is not a link.
!! wikitext
-http://example.com is not a link.
+http://example.com is not a link.
!! end
!! test
@@ -25443,7 +25381,7 @@ parsoid=html2wt
!! html/parsoid
!! wikitext
-http://example.com http://example.com is not a link.
+http://example.com http://example.com is not a link.
!! end
!! test
@@ -25686,26 +25624,6 @@ parsoid=html2wt
# Tests spec'ing wikitext serialization norms |
# --------------------------------------------
-!! test
-1. Categories should always be serialized on their own line
-!! options
-parsoid=html2wt
-!! html/parsoid
-foobar
-!! wikitext
-foo
-[[Category:Foo]]
-bar
-!! end
-
-!! test
-2. Categories that are part of templates should not introduce a line break
-!! wikitext
-foo {{echo|bar [[Category:baz]]}} bar
-!! html/parsoid
-
foo bar bar
-!! end
-
!! test
Lists: Add space after bullets
!! options