X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=c3975ca511579a616af9198964aa05920c6e3e4a;hb=2d63ce056d50d589b48addafd1c812b18711e0a7;hp=c1c421b890e70ca4bf38a0c686ea4d523954ca26;hpb=6117fb244fc63b2e9f4d70a1e3d467032f386f2a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index c1c421b890..c3975ca511 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -35,7 +35,8 @@ # # You can also set the following parser properties via test options: # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel, -# wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic +# wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic, +# wgEnableMagicLinks # # For testing purposes, temporary articles can created: # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle @@ -3055,6 +3056,28 @@ a | c !!end +!! test +2g. Indented table markup mixed with indented pre content (proposed in bug 6200) +!! wikitext + + + + +
+ Text that should be rendered preformatted +
+!! html + + + + +
+
Text that should be rendered preformatted
+
+
+ +!! end + !!test 3a. Indent-Pre and block tags (single-line html) !! wikitext @@ -6392,26 +6415,55 @@ parsoid=wt2html,html2html ho">ha !! end +## We don't support roundtripping of these attributes in Parsoid. +## Selective serialization takes care of preventing dirty diffs. +## But, on edits, we dirty-diff the invalid attribute text. !! test -Indented table markup mixed with indented pre content (proposed in bug 6200) +Invalid text in table attributes should be discarded +!! options +parsoid=wt2html !! wikitext - - - - -
- Text that should be rendered preformatted -
-!! html - - - - -
-
Text that should be rendered preformatted
-
-
+{| boo style='border:1px solid black' +| boo style='color:blue' | 1 +|boo style='color:blue'| 2 +|} +!! html/php + + + +
1 + 2 +
+ +!! html/parsoid + + + + + +
1 2
+!! end +!! test +Invalid text in table attributes should be preserved by selective serializer +!! options +parsoid={ + "modes": ["selser"], + "changes": [ + ["td:first-child", "text", "abc"], + ["td + td", "text", "xyz"] + ] +} +!! wikitext +{| boo style='border:1px solid black' +| boo style='color:blue' | 1 +|boo style='color:blue'| 2 +|} +!! wikitext/edited +{| boo style='border:1px solid black' +| boo style='color:blue' |abc +|boo style='color:blue'|xyz +|} !! end !! test @@ -8000,6 +8052,20 @@ title=[[User:test]]

/123

!! end +!! test +Ensure that transclusion titles are not url-decoded +!! options +subpage title=[[Test]] +parsoid=wt2html +!! wikitext +{{Bar%C3%A9}} {{/Bar%C3%A9}} +!! html/php +

{{Bar%C3%A9}} {{/Bar%C3%A9}} +

+!! html/parsoid +

{{Bar%C3%A9}} {{/Bar%C3%A9}}

+!! end + !! test Purely hash wikilink !! options @@ -10476,6 +10542,21 @@ X[//tools.ietf.org/html/rfc1234 foo]

Xfoo

!! end +!! test +Magic links: All disabled (T47942) +!! options +wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false} +!! wikitext +ISBN 0-306-40615-2 +PMID 1234 +RFC 4321 +!! html/php +

ISBN 0-306-40615-2 +PMID 1234 +RFC 4321 +

+!! end + ### ### Templates #### @@ -19388,9 +19469,11 @@ subpage title=[[Subpage test/L1/L2/L3]] parsoid=wt2html !! wikitext {{../../../../More than parent}} -!! html +!! html/php

{{../../../../More than parent}}

+!! html/parsoid +

{{../../../../More than parent}}

!! end !! test @@ -20822,6 +20905,26 @@ Id starting with underscore !! end +!! test +Edit comment with link with more than one pipe (T99346) +!! options +comment +!! wikitext +[[Main Page|Many|pipes]] +!! html +Many|pipes +!! end + +!! test +Complex edit comment with link with more than one pipe (T99346) +!! options +comment +!! wikitext +Created page with "[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]] === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..." +!! html +Created page with "<noinclude>{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}</noinclude> === User:MineoBot 8=== {{Request for permissions/links|Mineo..." +!! end + !! test Space normalisation on autocomment (bug 22784) !! options @@ -21548,6 +21651,22 @@ __TOC__ !! end +!! test +T35715: s/strike element in ToC +!! wikitext +__TOC__ +== test test test == +!! html +

Contents

+ +
+ +

test test test[edit]

+ +!! end + # Note that the html output does not have the

, but the # html+tidy output *does*. This is because the empty

is # removed by the sanitizer, but only when tidy is *not* enabled (!). @@ -27241,7 +27360,9 @@ Thumbnail output unclosed internal link XSS (T137264) !! wikitext [[#%3Cscript%3Ealert(1)%3C/script%3E| -!! html +!! html/php

[[#<script>alert(1)</script>|

+!! html/parsoid +

[[#%3Cscript%3Ealert(1)%3C/script%3E|

!! end