X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fparser%2FparserTests.txt;h=6477356c8a8b6bf18fa3812e65fcd0bd421d0ea8;hb=005802b82b106605a928394c859248c2f47f93bb;hp=be6e3a89965a40ed398ee9976e7893ca60b5bcc5;hpb=32ed9feb39c5acfadf33d34b66cb70bd2ff01d16;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index be6e3a8996..6477356c8a 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -32,6 +32,7 @@ # local format section links in edit comment text as local links # notoc disable table of contents # thumbsize=NNN set the default thumb size to NNNpx for this test +# wrap include the normal wrapper
Bug462 Bug462 +
!! html/php+tidy -Bug462 Bug462
+ !! html/parsoid !! end @@ -8047,7 +8048,7 @@ title=[[0]] !! wikitext [[0]] !! html -0 +
!!end @@ -8503,7 +8504,7 @@ parsoid=wt2html,wt2wt,html2html !! wikitext [[local:Main Page]] !! html/php -local:Main Page +
!! html/parsoid @@ -9962,9 +9963,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 +9975,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 +9987,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 +9999,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 +10011,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 +10023,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 +10035,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 +10047,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 +10059,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 +10070,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 +10082,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 +10094,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 +10106,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 +10118,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 +10130,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 +10142,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 +10154,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 +10166,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 +10178,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 +10190,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 +10202,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 +10214,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 +10226,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 +10249,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 +10261,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 +10275,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 +10289,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 +10301,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 +10313,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/* !! 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 +10380,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 +13791,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 @@ -15413,7 +15459,7 @@ Section headings with TOC Some text ===Another headline=== !! html -The tooltips shall not show entities to the user (ie. be double escaped)
-Id should not contain + for spaces
-http://
Both Dunav and ÐÑнав are names for this river. +
Both Dunav and ÐÑнав are names for this river.
!!end @@ -20344,7 +20461,7 @@ title=[[Duna]] language=sr !! wikitext [[ÐÑна]] is not a self-link while [[Duna]] and [[DÑна]] are still self-links. !! html -ÐÑна is not a self-link while Duna and DÑна are still self-links. +
ÐÑна is not a self-link while Duna and DÑна are still self-links.
!! end @@ -20355,7 +20472,7 @@ title=[[Duna]] language=sr !! wikitext [[DÑна]] is a self-link while [[Dunа#Foo]] and [[DÑна#Foo]] are not self-links. !! html -DÑна is a self-link while Dunа#Foo and DÑна#Foo are not self-links. +
DÑна is a self-link while Dunа#Foo and DÑна#Foo are not self-links.
!! end @@ -21793,7 +21910,7 @@ showindicators !! wikitextError: Page status indicators' name
attribute must not be empty.
Error: Page status indicators' name
attribute must not be empty.
@@ -21833,7 +21950,7 @@ showindicators
Quote== !! html -
Bar== !! html -
tag in TOC, removed by Sanitizer (T92892) __TOC__ == x == !! html -
<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 +23895,8 @@ Links 4. ExtLinks: Escapes needed parsoid=html2wt !! html/parsoid +google] +goog] le[http://google.com]
[http://google.com google]
@@ -23788,6 +23904,7 @@ parsoid=html2wt !! wikitext [http://google.com[http://google.com]
[http://google.com google]
[http://google.com] @@ -24142,7 +24260,7 @@ parsoid=html2wt !! test 4. No escaping needed !! options -options=html2wt +parsoid=html2wt !! html/parsoid
'bar' 'bar' @@ -24279,7 +24397,7 @@ parsoid=html2wt !! test 4. Leading whitespace in indent-pre suppressing contexts should not be escaped !! options -options=html2wt +parsoid=html2wt !! html/parsoid !! wikitext @@ -26633,6 +26751,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 @@ -27364,6 +27496,20 @@ d |} !! end +!! test +Anchor without href scenarios +!! options +parsoid={ "modes": ["html2wt"], "suppressErrors": true } +!! html/parsoid + +dice + +!! wikitext + +dice + +!! end + # ----------------------------------------------------------------- # End of section for Parsoid-only html2wt tests for serialization # of new content