From: Arlo Breault
Date: Thu, 30 Mar 2017 14:23:17 +0000 (-0400)
Subject: Sync up with Parsoid parserTests.txt
X-Git-Tag: 1.31.0-rc.0~3658
X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=c59307997233cfd54139891a10618c24e0fa8f4a;p=lhc%2Fweb%2Fwiklou.git
Sync up with Parsoid parserTests.txt
This now aligns with Parsoid commit b1b271460c341e844e21641b5307794cf4dd7feb
Change-Id: I792787b38c464efcb8c68b66b52a4dc9a0b41c36
---
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 2def8751ee..935c5394fe 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -9962,9 +9962,10 @@ Magic Words LOCAL (UTC)
Magic Word: {{FULLPAGENAME}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{FULLPAGENAME}}
-!! html
+!! html/*
User:Ãvar Arnfjörð Bjarmason
!! end
@@ -9973,9 +9974,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{FULLPAGENAMEE}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{FULLPAGENAMEE}}
-!! html
+!! html/*
User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
!! end
@@ -9984,9 +9986,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{TALKSPACE}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{TALKSPACE}}
-!! html
+!! html/*
User talk
!! end
@@ -9995,9 +9998,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{TALKSPACE}}, same namespace
!! options
title=[[User talk:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{TALKSPACE}}
-!! html
+!! html/*
User talk
!! end
@@ -10006,9 +10010,10 @@ title=[[User talk:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{TALKSPACE}}, main namespace
!! options
title=[[Parser Test]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{TALKSPACE}}
-!! html
+!! html/*
Talk
!! end
@@ -10017,9 +10022,10 @@ title=[[Parser Test]]
Magic Word: {{TALKSPACEE}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{TALKSPACEE}}
-!! html
+!! html/*
User_talk
!! end
@@ -10028,9 +10034,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{SUBJECTSPACE}}
!! options
title=[[User talk:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SUBJECTSPACE}}
-!! html
+!! html/*
User
!! end
@@ -10039,9 +10046,10 @@ title=[[User talk:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{SUBJECTSPACE}}, same namespace
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SUBJECTSPACE}}
-!! html
+!! html/*
User
!! end
@@ -10050,9 +10058,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{SUBJECTSPACE}}, main namespace
!! options
title=[[Parser Test]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SUBJECTSPACE}}
-!! html
+!! html/*
!! end
@@ -10060,9 +10069,10 @@ title=[[Parser Test]]
Magic Word: {{SUBJECTSPACEE}}
!! options
title=[[User talk:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SUBJECTSPACEE}}
-!! html
+!! html/*
User
!! end
@@ -10071,9 +10081,10 @@ title=[[User talk:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{NAMESPACE}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{NAMESPACE}}
-!! html
+!! html/*
User
!! end
@@ -10082,9 +10093,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{NAMESPACEE}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{NAMESPACEE}}
-!! html
+!! html/*
User
!! end
@@ -10093,9 +10105,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{NAMESPACENUMBER}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{NAMESPACENUMBER}}
-!! html
+!! html/*
2
!! end
@@ -10104,9 +10117,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{SUBPAGENAME}}
!! options
title=[[Ãvar Arnfjörð Bjarmason/sub ö]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SUBPAGENAME}}
-!! html
+!! html/*
sub ö
!! end
@@ -10115,9 +10129,10 @@ title=[[Ãvar Arnfjörð Bjarmason/sub ö]] subpage
Magic Word: {{SUBPAGENAMEE}}
!! options
title=[[Ãvar Arnfjörð Bjarmason/sub ö]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SUBPAGENAMEE}}
-!! html
+!! html/*
sub_%C3%B6
!! end
@@ -10126,9 +10141,10 @@ title=[[Ãvar Arnfjörð Bjarmason/sub ö]] subpage
Magic Word: {{ROOTPAGENAME}}
!! options
title=[[Ãvar Arnfjörð Bjarmason/sub/sub2]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{ROOTPAGENAME}}
-!! html
+!! html/*
Ãvar Arnfjörð Bjarmason
!! end
@@ -10137,9 +10153,10 @@ title=[[Ãvar Arnfjörð Bjarmason/sub/sub2]] subpage
Magic Word: {{ROOTPAGENAMEE}}
!! options
title=[[Ãvar Arnfjörð Bjarmason/sub/sub2]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{ROOTPAGENAMEE}}
-!! html
+!! html/*
%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
!! end
@@ -10148,9 +10165,10 @@ title=[[Ãvar Arnfjörð Bjarmason/sub/sub2]] subpage
Magic Word: {{BASEPAGENAME}}
!! options
title=[[Ãvar Arnfjörð Bjarmason/sub]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{BASEPAGENAME}}
-!! html
+!! html/*
Ãvar Arnfjörð Bjarmason
!! end
@@ -10159,9 +10177,10 @@ title=[[Ãvar Arnfjörð Bjarmason/sub]] subpage
Magic Word: {{BASEPAGENAMEE}}
!! options
title=[[Ãvar Arnfjörð Bjarmason/sub]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{BASEPAGENAMEE}}
-!! html
+!! html/*
%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
!! end
@@ -10170,9 +10189,10 @@ title=[[Ãvar Arnfjörð Bjarmason/sub]] subpage
Magic Word: {{TALKPAGENAME}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{TALKPAGENAME}}
-!! html
+!! html/*
User talk:Ãvar Arnfjörð Bjarmason
!! end
@@ -10181,9 +10201,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{TALKPAGENAMEE}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{TALKPAGENAMEE}}
-!! html
+!! html/*
User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
!! end
@@ -10192,9 +10213,10 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{SUBJECTPAGENAME}}
!! options
title=[[User talk:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SUBJECTPAGENAME}}
-!! html
+!! html/*
User:Ãvar Arnfjörð Bjarmason
!! end
@@ -10203,18 +10225,21 @@ title=[[User talk:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{SUBJECTPAGENAMEE}}
!! options
title=[[User talk:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SUBJECTPAGENAMEE}}
-!! html
+!! html/*
User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
!! end
!! test
Magic Word: {{NUMBEROFFILES}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{NUMBEROFFILES}}
-!! html
+!! html/*
7
!! end
@@ -10223,9 +10248,10 @@ Magic Word: {{NUMBEROFFILES}}
Magic Word: {{PAGENAME}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{PAGENAME}}
-!! html
+!! html/*
Ãvar Arnfjörð Bjarmason
!! end
@@ -10234,6 +10260,7 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{PAGENAME}} with metacharacters
!! options
title=[['foo & bar = baz']]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
''{{PAGENAME}}''
!! html/php
@@ -10247,6 +10274,7 @@ title=[['foo & bar = baz']]
Magic Word: {{PAGENAME}} with metacharacters (T28781)
!! options
title=[[*RFC 1234 http://example.com/]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{PAGENAME}}
!! html/php
@@ -10260,9 +10288,10 @@ title=[[*RFC 1234 http://example.com/]]
Magic Word: {{PAGENAMEE}}
!! options
title=[[User:Ãvar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{PAGENAMEE}}
-!! html
+!! html/*
%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
!! end
@@ -10271,6 +10300,7 @@ title=[[User:Ãvar Arnfjörð Bjarmason]]
Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
!! options
title=[[*RFC 1234 http://example.com/]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{PAGENAMEE}}
!! html/php
@@ -10282,53 +10312,65 @@ title=[[*RFC 1234 http://example.com/]]
!! test
Magic Word: {{REVISIONID}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{REVISIONID}}
-!! html
+!! html/*
1337
!! end
!! test
Magic Word: {{SCRIPTPATH}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SCRIPTPATH}}
-!! html
+!! html/*
!! end
!! test
Magic Word: {{STYLEPATH}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{STYLEPATH}}
-!! html
+!! html/*
/skins
!! end
!! test
Magic Word: {{SERVER}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SERVER}}
-!! html
+!! html/*
http://example.org
!! end
!! test
Magic Word: {{SERVERNAME}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SERVERNAME}}
-!! html
+!! html/*
example.org
!! end
!! test
Magic Word: {{SITENAME}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{SITENAME}}
-!! html
+!! html/*
MediaWiki
!! end
@@ -10337,18 +10379,21 @@ Magic Word: {{SITENAME}}
Magic Word: {{PAGELANGUAGE}}
!! options
language=fr
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{PAGELANGUAGE}}
-!! html
+!! html/*
fr
!! end
!! test
Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! wikitext
{{PAGELANGUAGE}}
-!! html
+!! html/*
en
!! end
@@ -13745,7 +13790,7 @@ Manually-specified thumbnail image
!! options
thumbsize=220
!! wikitext
-[[File:Foobar.jpg|thumb=Thumb.png|Title]]
+[[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
!! html/php
@@ -19613,6 +19658,31 @@ File:Test.png
!! end
+!! test
+Gallery with class attribute
+!! options
+parsoid={
+ "nativeGallery": true
+}
+!! wikitext
+
+File:Foobar.jpg
+
+!! html/php
+
+
+!! html/parsoid
+
+!! end
+
!! test
HTML Hex character encoding (spells the word "JavaScript")
!! options
@@ -21793,7 +21863,7 @@ showindicators
!! wikitext
-!! html
+!! html/php
Error: Page status indicators' name
attribute must not be empty.
Error: Page status indicators' name
attribute must not be empty.
@@ -21806,7 +21876,7 @@ showindicators
!! wikitext
-!! html
+!! html/php
empty=
name=
@@ -21833,7 +21903,7 @@ showindicators
Two
paragraphs
-!! html
+!! html/php
01=hello world
02=Main Page
03=
@@ -22746,14 +22816,12 @@ parsoid={
## recognized as an extension tag w/o a native handler.
!! test
LST Sections: Newfangled approach
-!! options
-parsoid={ "suppressErrors": true }
!! wikitext
!! html/parsoid
-
<section begin="2011-05-16" />
-<section end="2014-04-10 (MW 1.23wmf22)" />
+<section begin="2011-05-16" />
+<section end="2014-04-10 (MW 1.23wmf22)" />
!! end
#--------- Test stripping of empty nodes in template content ----------
@@ -23780,7 +23848,8 @@ Links 4. ExtLinks: Escapes needed
parsoid=html2wt
!! html/parsoid
[google]
-google]
+google]
+goog] le
[http://google.com]
[http://google.com google]
[http://google.com ]
@@ -23788,6 +23857,7 @@ parsoid=html2wt
!! wikitext
[http://google.com [google] ]
[http://google.com google] ]
+[http://google.com goog] le ]
[http://google.com]
@@ -23799,6 +23869,7 @@ parsoid=html2wt
!! html/php
[google]
google]
+goog] le
[http://google.com]
[http://google.com google]
[http://google.com ]
@@ -24142,7 +24213,7 @@ parsoid=html2wt
!! test
4. No escaping needed
!! options
-options=html2wt
+parsoid=html2wt
!! html/parsoid
'bar '
'bar '
@@ -24279,7 +24350,7 @@ parsoid=html2wt
!! test
4. Leading whitespace in indent-pre suppressing contexts should not be escaped
!! options
-options=html2wt
+parsoid=html2wt
!! html/parsoid
caption
!! wikitext
@@ -26633,6 +26704,20 @@ parsoid= {
# Tests spec'ing wikitext serialization norms |
# --------------------------------------------
+!! test
+Serialize multi-line indent-pre starting with wikitext syntax
+!! options
+parsoid=html2wt
+!! html/parsoid
+
* 1
+** 2
+* 3
+!! wikitext
+ * 1
+ ** 2
+ * 3
+!! end
+
!! test
1. Categories should always be serialized on their own line
!! options