X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=22970a147d9ffbeee2c3b1fa5215afa233029e8b;hb=42a1d6bf0312cf73ed9c90c1c788b9027665d18a;hp=706d33b1f3d7634d40cdf97c81cf03b589f043ff;hpb=a90aab9ee2b0c8de87e03b4f9f8718d07d227c36;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 706d33b1f3..22970a147d 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -615,6 +615,26 @@ disabled !! end +!! test +Definition and unordered list using wiki syntax nested in unordered list using html tags. +!! input +
Test +
+!! end + +!! test +External links: protocol-relative URL in brackets without text +!! input +[//example.com] +!! result +[1] +
+!! end + +!! test +External links: protocol-relative URL in free text is left alone +!! input +//example.com/Foo +!! result +//example.com/Foo +
+!!end + +!! test +External links: protocol-relative URL in the middle of a word is left alone (bug 30269) +!! input +foo//example.com/Foo +!! result +foo//example.com/Foo +
+!! end + !! test External image !! input @@ -975,33 +1031,6 @@ External links: wiki links within external link (Bug 3695) !! end -!! test -External links: links containing empty bracket pair [] -!! input -[http://example.com?parameter[]=foo link] -!! result -link -
-!! end - -!! test -External links: links ending in empty bracket pair [] -!! input -[http://example.com?parameter[]=foo&option[]] -!! result -[1] -
-!! end - -!! test -External links: bare links ending in empty bracket pair [] -!! input -http://example.com?parameter[]=foo&option[] -!! result -http://example.com?parameter%5B%5D=foo&option%5B%5D -
-!! end - !! test BUG 787: Links with one slash after the url protocol are invalid !! input @@ -1041,8 +1070,10 @@ http://www.example.com/?title=AT%26T !! end +# According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain +# % is actually legal in HTML5. Any change in output would need testing though. !! test -Bug 4781, 5267: %26 in URL +Bug 4781, 5267: %25 in URL !! input http://www.example.com/?title=100%25_Bran !! result @@ -1160,6 +1191,29 @@ URL-encoding in URL functions (multiple parameters) !! end +!! test +Brackets in urls +!! input +http://example.com/index.php?foozoid%5B%5D=bar + +http://example.com/index.php?foozoid[]=bar +!! result +http://example.com/index.php?foozoid%5B%5D=bar +
http://example.com/index.php?foozoid%5B%5D=bar +
+!! end + +!! test +IPv6 urls (bug 21261) +!! options +disabled +!! input +http://[2404:130:0:1000::187:2]/index.php +!! result +http://[2404:130:0:1000::187:2]/index.php +
+!! end + ### ### Quotes ### @@ -1237,10 +1291,8 @@ A table with nothing but a caption |} !! result1 | -2 | -1 | +2 + |
3 | -4 | -
× | -1 | -2 | -3 | -× | +1 | +2 | +3 + |
---|---|---|---|
1 | -1 | -2 | -3 | -1 + | +1 | +2 | +3 + |
2 | -2 | -4 | -6 | -2 + | +2 | +4 | +6 + |
3 | -3 | -6 | -9 | -3 + | +3 | +6 | +9 + |
4 | -4 | -8 | -12 | -4 + | +4 | +8 | +12 + |
5 | -5 | -10 | -15 | -
Cell 1, row 1 | -Cell 2, row 1 (and 2) | -Cell 3, row 1 | -Cell 1, row 1 + | +Cell 2, row 1 (and 2) + | +Cell 3, row 1 + |
Cell 1, row 2 | -Cell 3, row 2 | -
α | +α + |
|
-the original table again | -
broken | -
-[edit] Heading- |
-
Cell | -
Cell | -
Cell | -Value | -
---|
[ftp://%7Cx | -]" onmouseover="alert(document.cookie)">test | +]" onmouseover="alert(document.cookie)">test + |
+ Text that should be rendered preformatted + | +
1 | -2 | -
3 | -4 | -
+Text that should be rendered preformatted ++ |
+
xxxmain Page, xxxMain Page, Xxxmain Page XXXmain Page, XXXMain Page +
xxxmain Page, xxxMain Page, Xxxmain Page XXXmain Page, XXXMain Page
!! end @@ -1594,7 +1583,7 @@ Link with suffix !! input [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!! !! result -Main Pagexxx, Main PageXXX, Main Page!!! +
Main Pagexxx, Main PageXXX, Main Page!!!
!! end @@ -1752,6 +1741,34 @@ Plain link to URL !! end +!! test +Plain link to URL with link text +!! input +[[http://www.example.com Link text]] +!! result +[Link text] +
+!! end + +!! test +Plain link to protocol-relative URL +!! input +[[//www.example.com]] +!! result +[[1]] +
+!! end + +!! test +Plain link to protocol-relative URL with link text +!! input +[[//www.example.com Link text]] +!! result +[Link text] +
+!! end + + # I'm fairly sure the expected result here is wrong. # We want these to be URL links, not pseudo-pages with URLs for titles.... # However the current output is also pretty screwy. @@ -1827,7 +1844,7 @@ title=[[0]] !!input [[00]] !!result -00 +
!!end @@ -1856,7 +1873,7 @@ language=ca !! input '''[[Main Page]]''' !! result - !! end @@ -1867,7 +1884,7 @@ language=ca !! input ''[[Main Page]]'' !! result - !! end @@ -1913,7 +1930,7 @@ Inline interwiki link !! input [[MeatBall:SoftSecurity]] !! result - !! end @@ -1922,7 +1939,7 @@ Inline interwiki link with empty title (bug 2372) !! input [[MeatBall:]] !! result - !! end @@ -2019,13 +2036,13 @@ Incorrecly removing closing slashes from correctly formed XHTML !! test Failing to transform badly formed HTML into correct XHTML !! input -
-
-
+
+
+
RFC 822 +
!! end @@ -2547,7 +2564,7 @@ Magic links: PMID incorrectly converts space to underscore !! input PMID 1234 !! result - !! end @@ -2773,9 +2790,8 @@ BUG 553: link with two variables in a piped link !! result[[{{{1}}}|{{{2}}}]] | -
Template loop detected: Template:Loop1 +
Template loop detected: Template:Loop1
!! end @@ -2884,14 +2900,13 @@ foo {{table}}1 | -2 | -1 | +2 + |
3 | -4 | -
1 | -2 | -1 | +2 + |
3 | -4 | -
Category:MediaWiki User's Guide +
Category:MediaWiki User's Guide
!! end @@ -4437,9 +4585,9 @@ div with unquoted attribute !! test div with illegal double attributes !! input -status | -
---|
Main Page] +
!! end @@ -4907,9 +5054,8 @@ Table attribute legitimate extension !! resultstatus | -
---|
status | -
---|
+ <meta http-equiv="refresh" content="5"> +
+ + <link rel="stylesheet" href="http://Britney-Spears"> ++ | + |
foo | -
irc://{{ftp://a" onmouseover="alert('hello world');" | -+ | irc://{{ftp://a" onmouseover="alert('hello world');" + | ++ |
---|
-# | -#
{{{| -
}}}} > -
-
-MOVE YOUR MOUSE CURSOR OVER THIS TEXT
-
+ | + |
Xyzzyx |
Xyzzyx |
Xyzzyx |
Xyzzyx |
Xyzzyx |
Xyzzyx |
caption
RFC RFC 1234 +
RFC RFC 1234
!! end @@ -7087,7 +7273,7 @@ RFC code coverage !! input RFC 983 987 !! result -RFC 983 987 +
RFC 983 987
!! end @@ -7567,7 +7753,7 @@ language=sr !! input [[Main Page]] can be written as [[Ðаин Ðаге]] same as [[Ðаин Ðаге]]. !! result -Main Page can be written as Ðаин Ðаге same as Ðаин Ðаге. +
Main Page can be written as Ðаин Ðаге same as Ðаин Ðаге.
!!end @@ -7662,7 +7848,7 @@ language=sr variant=sr-ec !! input -{[[Main Page]]}- !! result - !! end @@ -7674,7 +7860,7 @@ language=sr variant=sr-ec !! input == -{Naslov}- == !! result -1 | -2 | -1 | +2 + |
3 | -4 | -
y
!! end @@ -8164,9 +8350,9 @@ wgLinkHolderBatchSize=0 [[meatball:2]] [[meatball:3]] !! result -meatball:1 -meatball:2 -meatball:3 +
meatball:1 +meatball:2 +meatball:3
!! end @@ -8283,7 +8469,7 @@ comment !! input I like the [[Main Page]] a lot !! result -I like the Main Page a lot +I like the Main Page a lot !!end !! test @@ -8313,7 +8499,7 @@ comment title=[[Main Page]] !! input /* External links */ removed bogus entries !! result -âExternal links: removed bogus entries +ââExternal links: removed bogus entries !!end !! test @@ -8323,7 +8509,7 @@ comment local title=[[Main Page]] !! input /* External links */ removed bogus entries !! result -âExternal links: removed bogus entries +ââExternal links: removed bogus entries !!end !! test @@ -8410,7 +8596,7 @@ title=[[Main Page]] !!input /* __hello__world__ */ !! result -â__hello__world__ +ââ__hello__world__ !! end !! test @@ -8425,6 +8611,8 @@ comment !! test Bad images - basic functionality +!! options +disabled !! input [[File:Bad.jpg]] !! result @@ -8432,6 +8620,8 @@ Bad images - basic functionality !! test Bad images - bug 16039: text after bad image disappears +!! options +disabled !! input Foo bar [[File:Bad.jpg]] @@ -8635,27 +8825,287 @@ Special characters in embedded file links (bug 27679) !! end + +!! test +Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4) +!! input +Text's been normalized? +!! result +Text's been normalized? +
+!! end + +!! test +Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links +!! input +http://www.example.org/ã<-- U+3000 (vim: ^Vu3000) +!! result +http://www.example.org/ã<-- U+3000 (vim: ^Vu3000) +
+!! end + +!! test +Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links +!! input +[http://www.example.org/ãideograms] +!! result + +!! end + +!! test +Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links +!! input +http://www.example.org/pic.pngã<-- U+3000 (vim: ^Vu3000) +!! result +ã<-- U+3000 (vim: ^Vu3000)
+
Template loop detected: Template:Identical +Template loop detected: Template:Identical +
+!! end + +!! test +Deprecated presentational attributes are converted to css +!! input +{| +| valign=top align=left width=100 height=25% | Asdf +|} +Asdf + |
Blah +
+!! end + +!! test +Bug31490 Turkish: ucfirst 'ix' +!! options +language=tr +!! input +{{ucfirst:ix}} +!! result +Ä°x +
+!! end + +!! test +Bug31490 Turkish: lcfirst 'BLAH' +!! options +language=tr +!! input +{{lcfirst:BLAH}} +!! result +bLAH +
+!! end + +!! test +Bug31490 Turkish: ucfırst (with a dotless i) +!! options +language=tr +!! input +{{ucfırst:blah}} +!! result + +!! end + +!! test +Bug31490 ucfırst (with a dotless i) with English language +!! options +language=en +!! input +{{ucfırst:blah}} +!! result + +!! end + +!! test +Bug 26375: TOC with italics +!! options +title=[[Main Page]] +!! input +__TOC__ +== ''Lost'' episodes == +!! result +Contents |
Contents |
Contents
|
Quote== +!! result +
Contents
|
Quote
Contents |
Hanc marginis exiguitas non caperet. +QED
!! end +!! test +Multiple tags in TOC +!! input +__TOC__ +== Foo Bar == + +== FooBar== +!! result +
Contents |
Bar
Contents
|