X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FparserTests.txt;h=a30db63492adcfb85ac5f0ed305a74c908bb6525;hb=739b6549393288d864d71c0e369f68dde5964383;hp=72e01362490725b9267a80855044b5cbc60d2768;hpb=b4797ffc7d050b05ff1f682d82ffe583ced8b3f4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 72e0136249..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
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 @@ -988,7 +1027,7 @@ URL-encoding in URL functions (single parameter) !! input {{localurl:Some page|amp=&}} !! result -/index.php?title=Some_page&=%26 +
/index.php?title=Some_page&=&
!! end @@ -997,7 +1036,7 @@ URL-encoding in URL functions (multiple parameters) !! input {{localurl:Some page|q=?&=&}} !! result -/index.php?title=Some_page&q=%3F&=%26 +
/index.php?title=Some_page&q=?&=&
!! end @@ -1225,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 -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 @@ -1293,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 @@ -1331,7 +1399,7 @@ Link to namespaces !! input [[Talk:Parser testing]], [[Meta:Disclaimers]] !! result -Talk:Parser testing, Meta:Disclaimers +
Talk:Parser testing, Meta:Disclaimers
!! end @@ -1340,7 +1408,7 @@ Piped link to namespace !! input [[Meta:Disclaimers|The disclaimers]] !! result - !! end @@ -1358,7 +1426,7 @@ Link containing % (not as a hex sequence) !! input [[7% Solution]] !! result - !! end @@ -1367,7 +1435,7 @@ Link containing % as a single hex sequence interpreted to char !! input [[7%25 Solution]] !! result - !!end @@ -1386,7 +1454,7 @@ Example for such a section: == < == !! input [[%23%3c]][[%23%3e]] !! result - !! end @@ -1413,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 @@ -1422,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 @@ -1442,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 @@ -1903,7 +1971,7 @@ Magic Word: {{NUMBEROFARTICLES}} !! input {{NUMBEROFARTICLES}} !! result -1 +
2
!! end @@ -2028,7 +2096,7 @@ Namespace -1 {{ns:-1}} !! end !! test -Namespace Project {{ns:User}} +Namespace User {{ns:User}} !! input {{ns:User}} !! result @@ -2036,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 @@ -2045,7 +2171,7 @@ Magic links: internal link to RFC (bug 479) !! input [[RFC 123]] !! result -RFC 123 +
!! end @@ -2063,7 +2189,7 @@ Magic links: ISBN (bug 1937) !! input ISBN 0-306-40615-2 !! result - !! end @@ -2085,7 +2211,7 @@ Nonexistant template !! input {{thistemplatedoesnotexist}} !! result -Template:Thistemplatedoesnotexist +
Template:Thistemplatedoesnotexist
!! end @@ -2267,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 @@ -2376,7 +2502,7 @@ Template infinite loop !! input {{loop1}} !! result -loop1 +
Template loop detected: Template:Loop1
!! end @@ -2541,6 +2667,64 @@ Foo
+
Image:test +#
Image:test !! input [[:Image:test]] !! result -
!! end @@ -2993,7 +3242,7 @@ Frameless image caption with a free URL !! input [[Image:foobar.jpg|http://example.com]] !! result - !! end @@ -3002,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 @@ -3011,7 +3269,7 @@ BUG 1887: A ISBN with a thumbnail !! input [[Image:foobar.jpg|thumb|ISBN 1235467890]] !! result - + !! end @@ -3020,7 +3278,7 @@ BUG 1887: A RFC with a thumbnail !! input [[Image:foobar.jpg|thumb|This is RFC 12354]] !! result -/subpage +
!! end @@ -3195,7 +3453,7 @@ subpage title=[[Page]] !! input {{/Subpage}} !! result - !! end @@ -3213,7 +3471,7 @@ Link to category !! input [[:Category:MediaWiki User's Guide]] !! result -Category:MediaWiki User's Guide +
Category:MediaWiki User's Guide
!! end @@ -3224,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 ### @@ -3256,13 +3523,13 @@ More ===Smaller headline=== Blah blah !! result -Some text
-More
-Blah blah
!! end @@ -3301,14 +3568,14 @@ Some text -Some text
-Contents |
Contents |
bytebacklink +
bytebacklink
!! end @@ -4385,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
|