X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FparserTests.txt;h=43463c0e31b3932a757cb1b2a6727faad9c9e98c;hb=06e2f914846efb62ee2165e5b6a6a36485e3177a;hp=aabb945c2bd00088811eed190663cf15a6a1b77f;hpb=6603e4e0cb096873ffbad99dda17a9b24bdb4763;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index aabb945c2b..43463c0e31 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -536,11 +536,11 @@ External links: numbered !! input Numbered: [http://example.com] Numbered: [http://example.net] -Numbered: [http://example.org] +Numbered: [http://example.com] !! result

Numbered: [1] Numbered: [2] -Numbered: [3] +Numbered: [3]

!!end @@ -1027,7 +1027,7 @@ URL-encoding in URL functions (single parameter) !! input {{localurl:Some page|amp=&}} !! result -

/index.php?title=Some_page&amp=%26 +

/index.php?title=Some_page&amp=&

!! end @@ -1036,7 +1036,7 @@ URL-encoding in URL functions (multiple parameters) !! input {{localurl:Some page|q=?&=&}} !! result -

/index.php?title=Some_page&q=%3F&amp=%26 +

/index.php?title=Some_page&q=?&amp=&

!! end @@ -1264,7 +1264,9 @@ Invalid attributes in table cell (bug 1830) !! end -# FIXME: this one has incorrect tag nesting still. +# FIXME: It's not clear at all that this is the result we want, but the actual +# output right now is invalid XML, so clearly something is wrong. The result +# specified here is now valid XML, which is an improvement . . . !! test Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html) !! input @@ -1273,7 +1275,7 @@ Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitec !! result -
[1]" onmouseover="alert(document.cookie)">test +[1]" onmouseover="alert(document.cookie)">test
@@ -1320,6 +1322,33 @@ Broken link

!! end +!! test +Broken link with fragment +!! input +[[Zigzagzogzagzig#zug]] +!! result +

Zigzagzogzagzig#zug +

+!! end + +!! test +Special page link with fragment +!! input +[[Special:Version#anchor]] +!! result +

Special:Version#anchor +

+!! end + +!! test +Nonexistent special page link with fragment +!! input +[[Special:ThisNameWillHopefullyNeverBeUsed#anchor]] +!! result +

Special:ThisNameWillHopefullyNeverBeUsed#anchor +

+!! end + !! test Link with prefix !! input @@ -1332,9 +1361,9 @@ xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main !! test Link with suffix !! input -[[Main Page]]xxx, [[Main Page]]XXX +[[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!! !! result -

Main Pagexxx, Main PageXXX +

Main Pagexxx, Main PageXXX, Main Page!!!

!! end @@ -1468,9 +1497,9 @@ Link containing double-single-quotes '' in text embedded in italics (bug 4598 sa !! test Plain link to URL !! input -[[http://www.example.org]] +[[http://www.example.com]] !! result -

[[1]] +

[[1]]

!! end @@ -1481,16 +1510,16 @@ Plain link to URL # ---- # I'm changing it to match the current output--it arguably makes more # sense in the light of the test above. Old expected result was: -#

Piped link to URL: an example URL +#

Piped link to URL: an example URL #

# But I think this test is bordering on "garbage in, garbage out" anyway. # -- wtm !! test Piped link to URL !! input -Piped link to URL: [[http://www.example.org|an example URL]] +Piped link to URL: [[http://www.example.com|an example URL]] !! result -

Piped link to URL: [example URL] +

Piped link to URL: [example URL]

!! end @@ -3310,7 +3339,7 @@ Link to category !! input [[:Category:MediaWiki User's Guide]] !! result -

Category:MediaWiki User's Guide +

Category:MediaWiki User's Guide

!! end @@ -3321,7 +3350,7 @@ cat !! input [[Category:MediaWiki User's Guide]] !! result -MediaWiki User's Guide +MediaWiki User's Guide !! end !! test @@ -4903,11 +4932,16 @@ MOVE YOUR MOUSE CURSOR OVER THIS TEXT !! end -# Known to produce bad XML for now +# Note: the current result listed for this is not what the original one was, +# but the original bug was JavaScript injection, which is fixed in any case. +# It's not clear that the original result listed was any more correct than the +# current one. Original result: +#

{{{| +#

+#
  • +# }}}blah" onmouseover="alert('hello world');" align="left"MOVE MOUSE CURSOR OVER HERE !!test Fuzz testing: Parser25 (bug 6055) -!! options -noxml !! input {{{ | @@ -4915,11 +4949,8 @@ noxml > }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE !! result -

    {{{| +

    <LI CLASS=blah" onmouseover="alert('hello world');" align="left"MOVE MOUSE CURSOR OVER HERE

    -
  • -}}}blah" onmouseover="alert('hello world');" align="left"MOVE MOUSE CURSOR OVER HERE - !! end !!test @@ -5048,14 +5079,19 @@ New wiki paragraph

    !! end - +# Original result was this: +#

    boldboldbolditalics +#

    +# While that might be marginally more intuitive, maybe, the six-apostrophe +# construct is clearly pathological and the result stated here (which is what +# the parser actually does) is about as reasonable as anything. !!test Mixing markup for italics and bold !! options !! input '''bold''''''bold''bolditalics''''' !! result -

    boldboldbolditalics +

    'bold'boldbolditalics

    !! end @@ -6175,6 +6211,33 @@ Width + Height sized image (using px) (height is ignored)

    !!end +!! test +Width-sized image (using px, no following whitespace) +!! input +[[Image:foobar.jpg|640px]] +!! result +

    +

    +!!end + +!! test +Width-sized image (using px, with following whitespace - test regression from r39467) +!! input +[[Image:foobar.jpg|640px ]] +!! result +

    +

    +!!end + +!! test +Width-sized image (using px, with preceding whitespace - test regression from r39467) +!! input +[[Image:foobar.jpg| 640px]] +!! result +

    +

    +!!end + !! test Another italics / bold test !! input @@ -6270,8 +6333,6 @@ subpage title=[[Subpage test/L1/L2/L3]]

    !! end - -# Question: should result be "/index.php?title=Subpage_test/L1&action=edit" instead? !! test Parents of subpages, two levels up, without trailing slash or name. !! options @@ -6279,12 +6340,10 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../..]] !! result -

    ../.. +

    [[../..]]

    !! end -# Question: Why should the link text in the above test be "../..", yet in this test the "../.." part is silently dropped? -# Current result:

    /// !! test Parents of subpages, two levels up, with lots of extra trailing slashes. !! options @@ -6292,7 +6351,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../../////]] !! result -

    Subpage test/L1 +

    ///

    !! end @@ -6593,7 +6652,7 @@ language=sr cat !! input [[:Category:МедиаWики Усер'с Гуиде]] !! result -MediaWiki User's Guide +MediaWiki User's Guide !! end @@ -6829,6 +6888,208 @@ pst !! end +!! test +Paragraphs inside divs (no extra line breaks) +!! input +
    Line one + +Line two
    +!! result +
    Line one +Line two
    + +!! end + +!! test +Paragraphs inside divs (extra line break on open) +!! input +
    +Line one + +Line two
    +!! result +
    +

    Line one +

    +Line two
    + +!! end + +!! test +Paragraphs inside divs (extra line break on close) +!! input +
    Line one + +Line two +
    +!! result +
    Line one +

    Line two +

    +
    + +!! end + +!! test +Paragraphs inside divs (extra line break on open and close) +!! input +
    +Line one + +Line two +
    +!! result +
    +

    Line one +

    Line two +

    +
    + +!! end + +# Bug 6200:
    should behave like
    with respect to line breaks +!! test +Bug 6200: paragraphs inside blockquotes (no extra line breaks) +!! input +
    Line one + +Line two
    +!! result +
    Line one +Line two
    + +!! end + +!! test +Bug 6200: paragraphs inside blockquotes (extra line break on open) +!! input +
    +Line one + +Line two
    +!! result +
    +

    Line one +

    +Line two
    + +!! end + +!! test +Bug 6200: paragraphs inside blockquotes (extra line break on close) +!! input +
    Line one + +Line two +
    +!! result +
    Line one +

    Line two +

    +
    + +!! end + +!! test +Bug 6200: paragraphs inside blockquotes (extra line break on open and close) +!! input +
    +Line one + +Line two +
    +!! result +
    +

    Line one +

    Line two +

    +
    + +!! end + +!! test +Paragraphs inside blockquotes/divs (no extra line breaks) +!! input +
    Line one + +Line two
    +!! result +
    Line one +Line two
    + +!! end + +!! test +Paragraphs inside blockquotes/divs (extra line break on open) +!! input +
    +Line one + +Line two
    +!! result +
    +

    Line one +

    +Line two
    + +!! end + +!! test +Paragraphs inside blockquotes/divs (extra line break on close) +!! input +
    Line one + +Line two +
    +!! result +
    Line one +

    Line two +

    +
    + +!! end + +!! test +Paragraphs inside blockquotes/divs (extra line break on open and close) +!! input +
    +Line one + +Line two +
    +!! result +
    +

    Line one +

    Line two +

    +
    + +!! end + +!! test +Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion +!! options +wgLinkHolderBatchSize=0 +!! input +[[meatball:1]] +[[meatball:2]] +[[meatball:3]] +!! result +

    meatball:1 +meatball:2 +meatball:3 +

    +!! end + +!! test +Free external link invading image caption +!! input +[[Image:Foobar.jpg|thumb|http://x|hello]] +!! result +
    hello
    hello
    + +!! end + # # #