X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=c34d408f6a88bcd1279725ed31fbcb2a72f392dc;hp=e1a94b38363683941acb50eaf1fcae2a7d54835e;hb=56d45558b102349f3480a46819669407aa3be2d6;hpb=68527cf47935a0350d3f0a153bd06cbb98062ec8 diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index e1a94b3836..c34d408f6a 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -62,6 +62,12 @@ Template:Foo FOO !!endarticle +!! article +Template:redirect to foo +!! text +#REDIRECT [[Template:Foo]] +!! endarticle + !! article Template:Blank !! text @@ -109,6 +115,14 @@ Template:echo {{{1}}} !! endarticle +!! article +Template:echo3 +!! text +{{{1}}} +{{{1}}} +{{{1}}} +!! endarticle + // For Serbian; localize Template namespace !! article Шаблон:Echo @@ -128,6 +142,12 @@ Template:echo_with_div
{{{1}}}
!! endarticle +!! article +Template:echo with depth +!! text +{{echo|{{{1}}}}} +!! endarticle + !! article Template:blank_param !! text @@ -237,7 +257,7 @@ Weirdo titles! !!article Template:Bullet !!text -* Bar +*Bar !!endarticle !!article @@ -307,23 +327,31 @@ This is a simple paragraph. !! test Paragraphs with extra newline spacing !! wikitext -foo +a -bar +b (+2 nls) -baz +c (+3 nls) + +d (+4 nls) -booz + + + +e (+5 nls) !! html -

foo -

bar +

a +

b (+2 nls)


-baz +c (+3 nls) +


+

d (+4 nls)


-

booz +


+e (+5 nls)

!! end @@ -495,7 +523,6 @@ Extra newlines followed by heading a - =b= [[a]] @@ -514,19 +541,89 @@ a !! end !! test -Extra newlines between heading and content are swallowed +Extra newlines between heading and content are swallowed (Parsoid does not) !! wikitext =b= [[a]] -!! html +!! html/php+tidy

b[edit]

a

+!! html/parsoid +

b

+

+

+ +

a

+!! end + +!! test +Extra new lines before and after lists are preserved +!! wikitext +a + + +*b + + +c +!! html/php+tidy +

a +


+

+ +


+c +

+!! html/parsoid +

a

+

+

+ +

+
+c

!! end +# Parsoid regression test +!!test +Multiple newlines after tables are converted to p-br-p tags +!!options +parsoid=wt2html,wt2wt +!!wikitext +{| +|x +|} + + + + +=b= +!!html/php+tidy + + +
x +
+


+


+

+

b[edit]

+!!html/parsoid + + + + + + +
x
+


+


+

b

+!!end + !! test Heading with line break in nowiki !! options @@ -1825,6 +1922,39 @@ b

!! end +!! test +post-expand include size being exceeded +!! options +maxincludesize=20 +!! wikitext +{{echo3|1234567890}} +!! html +

Template:Echo3 +

+!! end + +!! test +max template depth being reached +!! options +maxtemplatedepth=1 +!! wikitext +{{echo with depth|too deep!}} +!! html +

Template recursion depth limit exceeded (1) +

+!! end + +!! test +multiple templates that are redirects +!! wikitext +{{redirect to foo}} +{{redirect to foo}} +!! html +

FOO +FOO +

+!! end + !! test Multiple comments should still parse as SOL-transparent !! options @@ -2142,6 +2272,83 @@ hi !! end +!! test +Paragraph wrapping following unclosed table +!! options +parsoid=wt2html,html2html +!! wikitext +{| +|- + +{| +| x +|} + +a + +b + +c +!! html/php+tidy + + + +
+ +
x +
+

a +

b +

c +

+!! html/parsoid + + + +
+ +
x
+ +

a

+ +

b

+ +

c

+!! end + +!! test +Paragraph wrapping suppressed in html p +!! options +parsoid=wt2html,html2html +!! wikitext +

+ + +hi + + + +

+!! html/php+tidy +

+ + +hi + + + +

+!! html/parsoid +

+ + +hi + + + +

+!! end + ### ### Preformatted text ### @@ -2642,12 +2849,9 @@ parsoid=wt2html
x
<pre
!! html/parsoid -
x
- +
x
-

<pre

- -
+<pre
!! end !! test @@ -3258,6 +3462,57 @@ a !! end +!! test +2h. Indent pre in tables +!! options +parsoid=wt2html,html2html +!! wikitext +{| + ! + foo + ! + bar + |- + | + baz + {{!}} + bam + |} +!! html/php + + + + + + +
+
foo
+
+
+
bar
+
+
+
baz
+
+
+
bam
+
+
+ +!! html/parsoid + + +
+
foo
+
+
bar
+
+
baz
+
+
bam
+
+!! end + !!test 3a. Indent-Pre and block tags (single-line html) !! wikitext @@ -3285,24 +3540,24 @@ a !! end -!!test +!! test 3b. Indent-Pre and block tags (multi-line html) !! wikitext a foo - b
foo
-!! html + b
foo
+!! html/php
a foo
 
b
foo
!! html/parsoid
a foo
- b
foo
+

b

foo
!! html/php+tidy
a foo
 

b

foo
-!!end +!! end !!test 3c. Indent-Pre and block tags (pre-content on separate line) @@ -3749,7 +4004,7 @@ Definition list with bracketed URL link !! test Definition list with wikilink containing colon !! wikitext -; [[Help:FAQ]]:The least-read page on Wikipedia +;[[Help:FAQ]]:The least-read page on Wikipedia !! html
Help:FAQ
The least-read page on Wikipedia
@@ -3760,19 +4015,19 @@ Definition list with wikilink containing colon !! test Definition list with news link containing colon !! wikitext -;news:alt.wikipedia.rox: This isn't even a real newsgroup! +;news:alt.wikipedia.rox :This isn't even a real newsgroup! !! html/php -
news:alt.wikipedia.rox
+
news:alt.wikipedia.rox 
This isn't even a real newsgroup!
!! html/parsoid -
news:alt.wikipedia.rox
This isn't even a real newsgroup!
+
news:alt.wikipedia.rox
This isn't even a real newsgroup!
!! end !! test Malformed definition list with colon !! wikitext -; news:alt.wikipedia.rox -- don't crash or enter an infinite loop +;news:alt.wikipedia.rox -- don't crash or enter an infinite loop !! html
news:alt.wikipedia.rox -- don't crash or enter an infinite loop
@@ -4004,6 +4259,8 @@ should be left alone

!! test Definition Lists: Hacky use to indent tables, with comment before table +!!options +parsoid=wt2html !! wikitext ::{| |foo @@ -4019,7 +4276,7 @@ Definition Lists: Hacky use to indent tables, with comment before table !! test Definition Lists: Hacky use to indent tables (WS-insensitive) !! wikitext -: {| +:{| |a |} !! html/php @@ -4029,9 +4286,9 @@ Definition Lists: Hacky use to indent tables (WS-insensitive)
!! html/parsoid -
+
-
a
+ !! end ## The PHP parser treats : items (dd) without a corresponding ; item (dt) @@ -4967,7 +5224,7 @@ URL in text: [http://example.com http://example.com]

URL in text: http://example.com

!! html/parsoid -

URL in text: http://example.com

+

URL in text: http://example.com

!! end !! test @@ -5610,7 +5867,7 @@ Examples from RFC 2732, section 2: !! html/parsoid

http://[2404:130:0:1000::187:2]/index.php

-

Examples from RFC 2373, section 2.2:

+

Examples from RFC 2373, section 2.2:

-

Examples from RFC 2732, section 2:

+

Examples from RFC 2732, section 2: