X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fparser%2FparserTests.txt;h=368dc0d2134de56e67fcd441d10f4a7cc1796063;hb=33e4ac5b220b0edbef6774b3d961a3313fbf76e9;hp=7bf2ce2199e993e367d4f0d578e918fe7cd82abd;hpb=9b4fd6a6c054a8b012ea0d358478f3ee1c392469;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 7bf2ce2199..368dc0d213 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
{{ech +o|foo}} +
+!! html/parsoid +{{ech +o|foo}}
+!! end + +!! test +Templates: Recognize targets when newlines and comments don't split the target +!! options +parsoid=wt2html +!! wikitext +{{ + echo + + + |foo}} +!! html/php +foo +
+!! html/parsoid +foo
+!! end + !! test Templates: Handle empty comment-and-ws-only lines correctly !! wikitext @@ -5271,6 +5305,49 @@ Bracketed external links with template-generated invalid target !! end +# wt2html only because Parsoid would want to add[http://example.com x +
[http://example.com x +
[[Foo +
{{echo|[[Foo}} +
+!! html/parsoid + + +[[Foo
+{{echo|[[Foo}}
+!! end + +!! test +Broken templates +!! options +parsoid=wt2html +!! wikitext +{{echo|[[Foo|}}]] + +[[Foo|{{echo|]]}} +!! html/php +{{echo|}} +
[[Foo|]] +
+!! html/parsoid +{{echo|}}
+[[Foo|]]
+!! end + !! test T4702: Mismatched , and tags are invalid !! wikitext @@ -7847,7 +7924,7 @@ File containing double quotes and spaces !! wikitext [[File:Cool "Gator".png]] !! html/parsoid - + !! end !! test @@ -7895,7 +7972,7 @@ Link with double quotes in title part (literal) and alternate part (interpreted) !! html/parsoid - + @@ -7915,10 +7992,10 @@ Broken image links with HTML captions (T41700) abc !! html/parsoid - + !! end !! test @@ -10434,15 +10511,26 @@ Parsoid: Page property magic word with magic word contents !! wikitext {{DISPLAYTITLE:''{{PAGENAME}}''}} !! html/parsoid - + !! end +# NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better. +# But, this is a limitation of our representation and is documented in +# TemplateHandler.js in processSpecialMagicWord !! test Parsoid: Template-generated DISPLAYTITLE !! wikitext {{{{echo|DISPLAYTITLE}}:Foo}} +!! options +showtitle +!! config +wgAllowDisplayTitle=true +wgRestrictDisplayTitle=false +!! html/php +Foo + !! html/parsoid - + !! end !! test @@ -11005,6 +11093,39 @@ Template with complex template as argument !! end +!! test +Templates with templated name +!! wikitext +{{{{echo|echo}}|foo}} +{{{{echo|inner list}} }} +!! html +foo +
+foo
+{{echo +foo +}} +
+!! html/parsoid +{{echo +foo }}
+!! end + !! test Template with thumb image (with link in description) !! wikitext @@ -11020,7 +11141,7 @@ This is a test template with parameterThis is a test template with parameter
!! end !! article @@ -11252,17 +11373,23 @@ T2041: Template parameters shown as broken links !! test Template with targets containing wikilinks +!! options +parsoid=wt2html !! wikitext {{[[foo]]}} {{[[{{echo|foo}}]]}} {{{{echo|[[foo}}]]}} -!! html +!! html/php{{foo}}
{{foo}}
{{[[foo}}]]
+!! html/parsoid +{{foo}}
+{{foo}}
+{{[[foo}}]]
!! end !! article @@ -13111,6 +13238,17 @@ pst [[:Bar:Article (context)ï¼context|Article]] !! end +!! test +Parsoid: backwards pipe trick +!! wikitext +[[|'''bar''']] +!! html/php +[[|bar]] +
+!! html/parsoid +[[|bar]]
+!! end + !! test pre-save transform: trim trailing empty lines !! options @@ -14317,7 +14455,7 @@ Entities in file name and attributes !! html/parsoid - + !! end !! test @@ -14532,7 +14670,7 @@ wgEnableUploads=0 !! html/parsoid - + !! end # Parsoid-specific testing for images @@ -14865,6 +15003,7 @@ Render invalid page names as plain text (T53090) [[.]] [[..]] [[foo././bar]] +[[foo[http://example.com]xyz]] [[{{echo|./../foo}}|bar]] [[{{echo|foo/.}}|bar]] @@ -14888,6 +15027,7 @@ Render invalid page names as plain text (T53090) [[.]] [[..]] [[foo././bar]] +[[foo[1]xyz]][[./../foo|bar]] [[foo/.|bar]] [[foo/..|bar]] @@ -14910,7 +15050,8 @@ Render invalid page names as plain text (T53090) [[foo[bar]] [[.]] [[..]] -[[foo././bar]]
+[[foo././bar]] +[[fooxyz]][[./../foo|bar]] [[foo/.|bar]] @@ -15376,12 +15517,15 @@ Parsoid: Defaultsort !! end +# NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better. +# But, this is a limitation of our representation and is documented in +# TemplateHandler.js in processSpecialMagicWord !! test Parsoid: Defaultsort (template-generated) !! wikitext {{{{echo|DEFAULTSORT}}:Foo}} !! html/parsoid - + !! end ### @@ -15458,7 +15602,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
-Media:No such.jpg +Media:No_such file.jpg
+!! html/parsoid +Media:No such.jpg +Media:No_such file.jpg
!! end !! test @@ -16418,7 +16574,7 @@ Image link to nonexistent file (T3850 - good) !! html/parsoid - + !! end !! test @@ -17396,10 +17552,10 @@ Sanitizer: Validating that and work, but only for Microdata<meta http-equiv="refresh" content="5"> -
<link rel="stylesheet" href="http://example.org"> +http://
{{{|
-
-
MOVE YOUR MOUSE CURSOR OVER THIS TEXT