X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FparserTests.txt;h=a30db63492adcfb85ac5f0ed305a74c908bb6525;hb=739b6549393288d864d71c0e369f68dde5964383;hp=221d257a8b2ed91f433381b05a7aa94394ffd433;hpb=14cab769b9bb101a1fc8d6cefa0176397c5c9476;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 221d257a8b..a30db63492 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -33,6 +33,23 @@ Main Page blah blah !! endarticle +!!article +Template:Foo +!!text +FOO +!!endarticle + +!! article +Template:Blank +!! text +!! endarticle + +!! article +Template:! +!! text +| +!! endarticle + ### ### Basic tests ### @@ -81,6 +98,7 @@ Italics and bold * plain''italic'''bold-italic'''''plain * plain'''bold''bold-italic'''''plain * plain l'''italic''plain +* plain l''''bold''' plain !! result
--> +
-->
!! end @@ -264,7 +283,7 @@ Comment semantics: nesting !! input --> !! result ---> +
-->
!! end @@ -276,6 +295,26 @@ Comment semantics: unclosed comment at end !! end +!! test +Comment in template title +!! input +{{foo}} +!! result +FOO +
+!! end + +!! test +Comment on its own line post-expand +!! input +a +{{blank}} +b +!! result +a +
b +
+!! end ### ### Preformatted text @@ -422,7 +461,7 @@ Definition list with wikilink containing colon !! input ; [[Help:FAQ]]: The least-read page on Wikipedia !! result -Numbered: [1] Numbered: [2] -Numbered: [3] +Numbered: [3]
!!end @@ -848,7 +887,7 @@ External links: wiki links within external link (Bug 3695) !! input [http://example.com [[wikilink]] embedded in ext link] !! result -wikilink embedded in ext link +
!! end @@ -983,7 +1022,23 @@ External link containing double-single-quotes in text embedded in italics (bug 4 !! end +!! test +URL-encoding in URL functions (single parameter) +!! input +{{localurl:Some page|amp=&}} +!! result +/index.php?title=Some_page&=& +
+!! end +!! test +URL-encoding in URL functions (multiple parameters) +!! input +{{localurl:Some page|q=?&=&}} +!! result +/index.php?title=Some_page&q=?&=& +
+!! end ### ### Quotes @@ -1209,16 +1264,18 @@ 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 -TODO: Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html) +Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html) !! input {| | |[ftp://|x||]" onmouseover="alert(document.cookie)">test !! result[1] | " onmouseover="alert(document.cookie)">test + | [1] | " onmouseover="alert(document.cookie)">test |
Special:ThisNameWillHopefullyNeverBeUsed#anchor
!! end @@ -1277,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 @@ -1315,7 +1399,7 @@ Link to namespaces !! input [[Talk:Parser testing]], [[Meta:Disclaimers]] !! result -Talk:Parser testing, Meta:Disclaimers +
Talk:Parser testing, Meta:Disclaimers
!! end @@ -1324,7 +1408,7 @@ Piped link to namespace !! input [[Meta:Disclaimers|The disclaimers]] !! result - !! end @@ -1342,7 +1426,7 @@ Link containing % (not as a hex sequence) !! input [[7% Solution]] !! result - !! end @@ -1351,7 +1435,7 @@ Link containing % as a single hex sequence interpreted to char !! input [[7%25 Solution]] !! result - !!end @@ -1370,7 +1454,7 @@ Example for such a section: == < == !! input [[%23%3c]][[%23%3e]] !! result - !! end @@ -1384,7 +1468,7 @@ Link containing "<#" and ">#" as a hex sequences !! end !! test -TODO: Link containing double-single-quotes '' (bug 4598) +Link containing double-single-quotes '' (bug 4598) !! input [[Lista d''e paise d''o munno]] !! result @@ -1397,7 +1481,7 @@ Link containing double-single-quotes '' in text (bug 4598 sanity check) !! input Some [[Link|pretty ''italics'' and stuff]]! !! result -Some pretty italics and stuff! +
Some pretty italics and stuff!
!! end @@ -1406,16 +1490,16 @@ Link containing double-single-quotes '' in text embedded in italics (bug 4598 sa !! input ''Some [[Link|pretty ''italics'' and stuff]]! !! result -Some pretty italics and stuff! +
Some pretty italics and stuff!
!! end !! test Plain link to URL !! input -[[http://www.example.org]] +[[http://www.example.com]] !! result -[[1]] +
[[1]]
!! end @@ -1426,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 @@ -1470,6 +1554,34 @@ title=[[Main Page]] !! end +!! article +00 +!! text +This is 00. +!! endarticle + +!!test +Self-link to numeric title +!!options +title=[[0]] +!!input +[[0]] +!!result +0 +
+!!end + +!!test +Link to numeric-equivalent title +!!options +title=[[0]] +!!input +[[00]] +!!result +00 +
+!!end + !! testBlah blah blah +
+!! end + +!! test +Double interlanguage link +!! input +Blah blah blah +[[es:Spanish]] +[[zh:Chinese]] +!!result +Blah blah blah +
+!! end + +!! test +Interlanguage link, with prefix links +!! options +language=ln +!! input +Blah blah blah +[[zh:Chinese]] +!!result +Blah blah blah +
+!! end + +!! test +Double interlanguage link, with prefix links (bug 8897) +!! options +language=ln +!! input +Blah blah blah +[[es:Spanish]] +[[zh:Chinese]] +!!result +Blah blah blah +
+!! end + + ## ## XHTML tidiness ### @@ -1812,7 +1971,7 @@ Magic Word: {{NUMBEROFARTICLES}} !! input {{NUMBEROFARTICLES}} !! result -1 +
2
!! end @@ -1937,7 +2096,7 @@ Namespace -1 {{ns:-1}} !! end !! test -Namespace Project {{ns:User}} +Namespace User {{ns:User}} !! input {{ns:User}} !! result @@ -1945,6 +2104,64 @@ Namespace Project {{ns:User}} !! end +!! test +Namespace User talk {{ns:User_talk}} +!! input +{{ns:User_talk}} +!! result +User talk +
+!! end + +!! test +Namespace User talk {{ns:uSeR tAlK}} +!! input +{{ns:uSeR tAlK}} +!! result +User talk +
+!! end + +!! test +Namespace File {{ns:File}} +!! input +{{ns:File}} +!! result +File +
+!! end + +!! test +Namespace File {{ns:Image}} +!! input +{{ns:Image}} +!! result +File +
+!! end + +!! test +Namespace (lang=de) Benutzer {{ns:User}} +!! options +language=de +!! input +{{ns:User}} +!! result +Benutzer +
+!! end + +!! test +Namespace (lang=de) Benutzer Diskussion {{ns:3}} +!! options +language=de +!! input +{{ns:3}} +!! result +Benutzer Diskussion +
+!! end + ### ### Magic links @@ -1954,7 +2171,7 @@ Magic links: internal link to RFC (bug 479) !! input [[RFC 123]] !! result -RFC 123 +
!! end @@ -1963,7 +2180,7 @@ Magic links: RFC (bug 479) !! input RFC 822 !! result -RFC 822 +
!! end @@ -1972,7 +2189,7 @@ Magic links: ISBN (bug 1937) !! input ISBN 0-306-40615-2 !! result - !! end @@ -1994,7 +2211,7 @@ Nonexistant template !! input {{thistemplatedoesnotexist}} !! result -Template:Thistemplatedoesnotexist +
Template:Thistemplatedoesnotexist
!! end @@ -2176,7 +2393,7 @@ Template with thumb image (with link in description) {{paramtest| param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}} !! result -This is a test template with parameter +This is a test template with parameter !! end @@ -2285,7 +2502,7 @@ Template infinite loop !! input {{loop1}} !! result -loop1 +
Template loop detected: Template:Loop1
!! end @@ -2450,6 +2667,64 @@ Foo
+
Image:test +Add test with existing image page +#
Image:test !! input [[:Image:test]] !! result -
!! end @@ -2902,7 +3242,7 @@ Frameless image caption with a free URL !! input [[Image:foobar.jpg|http://example.com]] !! result - !! end @@ -2911,7 +3251,16 @@ Thumbnail image caption with a free URL !! input [[Image:foobar.jpg|thumb|http://example.com]] !! result - + + +!! end + +!! test +Thumbnail image caption with a free URL and explicit alt +!! input +[[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]] +!! result + !! end @@ -2920,7 +3269,7 @@ BUG 1887: A ISBN with a thumbnail !! input [[Image:foobar.jpg|thumb|ISBN 1235467890]] !! result - + !! end @@ -2929,7 +3278,7 @@ BUG 1887: A RFC with a thumbnail !! input [[Image:foobar.jpg|thumb|This is RFC 12354]] !! result -/subpage +
!! end @@ -3104,7 +3453,7 @@ subpage title=[[Page]] !! input {{/Subpage}} !! result - !! end @@ -3122,7 +3471,7 @@ Link to category !! input [[:Category:MediaWiki User's Guide]] !! result -Category:MediaWiki User's Guide +
Category:MediaWiki User's Guide
!! end @@ -3133,7 +3482,16 @@ cat !! input [[Category:MediaWiki User's Guide]] !! result -MediaWiki User's Guide +MediaWiki User's Guide +!! end + +!! test +PAGESINCATEGORY invalid title fatal (r33546 fix) +!! input +{{PAGESINCATEGORY:0 +
!! end ### @@ -3165,13 +3523,13 @@ More ===Smaller headline=== Blah blah !! result -Some text
-More
-Blah blah
!! end @@ -3210,14 +3568,14 @@ Some text -Some text
-Contents
|
Contents |
Contents |
bytebacklink +
bytebacklink
!! end @@ -4256,6 +4722,34 @@ Self closed html pairs (bug 5487) # # +!! test +Punctuation: nbsp before exclamation +!! input +C'est grave ! +!! result +C'est grave ! +
+!! end + +!! test +Punctuation: CSS !important (bug 11874) +!! input +Contents
[edit] a+[edit] a |