X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=751ec4118f1f34b25f2f0a4e1ecb6a27394cc33d;hb=a8448c557df18b6d3744bd5bd6d7a5ed0454443b;hp=bdafad8fb90ca0fd00d3e4111f7621c66bb2bdbd;hpb=557688e02007e96f209bc12dc527e82931920597;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index bdafad8fb9..751ec4118f 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -139,6 +139,12 @@ A?b Weirdo titles! !! endarticle +!!article +Template:Bullet +!!text +* Bar +!!endarticle + ### ### Basic tests ### @@ -190,7 +196,11 @@ a b ---- a - + +b +---- +a + b ---- a @@ -222,7 +232,11 @@ b


a -

b +b +

+
+

a +b


a @@ -282,7 +296,7 @@ a b ---- a - + b ---- a @@ -305,7 +319,7 @@ b


a -

b +b


a @@ -866,11 +880,11 @@ Non-html5 tags should be accepted !! end !! test - isn't (yet) valid wikitext (bug 52468) + is valid wikitext (bug 52468) !! input !! result -

<wbr> +

!! end @@ -1296,6 +1310,22 @@ And a link !! end +!! test +Tabs don't trigger preformatted text +!! input + This is not + preformatted text. + This is preformatted text. + So is this. +!! result +

This is not + preformatted text. +

+
This is preformatted text.
+	So is this.
+
+!! end + !! test Ident preformatting with inline content !! input @@ -1742,6 +1772,20 @@ c !!end +!!test +1d. Indent-Pre and Comments +(Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order) +!!input + a + + b +!!result +
a
+
+
b
+
+!!end + !!test 2a. Indent-Pre and tables !!input @@ -1894,6 +1938,52 @@ b !! end +!! test +6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content +!! input + a + + + b + + c + +d +!! result +
a
+
+b
+
+
c
+
+
+

d +

+!! end + +!! test +7a. Indent-pre and category links +!! options +parsoid=wt2html,wt2wt +!! input + [[Category:foo]] +{{echo| [[Category:foo]]}} +!! result + +!! end + +!! test +7b. Indent-pre and category links +!! options +parsoid=wt2html,wt2wt +!! input + [[Category:foo]] a + [[Category:foo]] {{echo|b}} +!! result +
 a b
+
+!! end + ### ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric) ### @@ -4874,6 +4964,46 @@ parsoid !! end +!! test +Optional colon in #REDIRECT +!! options +# the colon is archaic syntax. we support it for wt2html, but we +# don't care that it roundtrips back to the modern syntax. +parsoid=wt2html,html2html +!! input +#REDIRECT:[[Main Page]] +!! result + +!! end + +!! test +Whitespace in #REDIRECT with optional colon +!! options +# the colon and gratuitous whitespace is archaic syntax. we support +# it for wt2html, but we don't care that it roundtrips back to the +# modern syntax (without extra whitespace) +parsoid=wt2html,html2html +!! input + + #REDIRECT +: +[[Main Page]] +!! result + +!! end + +!! test +Piped link in #REDIRECT +!! options +# content after piped link is ignored. we support this syntax, +# but don't care that the piped link is lost when we roundtrip this. +parsoid=wt2html +!! input +#REDIRECT [[Main Page|bar]] +!! result + +!! end + !! test Redirect to category !! options @@ -4884,6 +5014,16 @@ parsoid=wt2html !! end +!! test +Redirect to category with URL encoding +!! options +parsoid=wt2html +!! input +#REDIRECT [[Category%3AFoo]] +!! result + +!! end + !! test Redirect to category page !! options @@ -4895,7 +5035,7 @@ parsoid=wt2html,html2html !! end !! test -Redirect to image page +Redirect to image page (1) !! options parsoid !! input @@ -4904,6 +5044,16 @@ parsoid !! end +!! test +Redirect to image page (2) +!! options +parsoid +!! input +#REDIRECT [[Image:Wiki.png]] +!! result + +!! end + !! test Redirect to language !! options @@ -4924,6 +5074,17 @@ parsoid !! end +!! test +Non-English #REDIRECT +!! options +parsoid +language=is +!! input +#TILVÍSUN [[Main Page]] +!! result + +!! end + ## ## XHTML tidiness ### @@ -5379,21 +5540,40 @@ Multiple list tags generated by templates !!end !!test -Single-comment whitespace lines dont break lists, but multi-comment whitespace lines do +Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines !!input *a *b *c - + *d !!result -