diff options
Diffstat (limited to 'maintenance/parserTests.txt')
-rw-r--r-- | maintenance/parserTests.txt | 116 |
1 files changed, 87 insertions, 29 deletions
diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index c84e0e35..1a427005 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -461,7 +461,7 @@ Definition list with wikilink containing colon !! input ; [[Help:FAQ]]: The least-read page on Wikipedia !! result -<dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (not yet written)">Help:FAQ</a></dt><dd> The least-read page on Wikipedia +<dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt><dd> The least-read page on Wikipedia </dd></dl> !! end @@ -887,7 +887,7 @@ External links: wiki links within external link (Bug 3695) !! input [http://example.com [[wikilink]] embedded in ext link] !! result -<p><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (not yet written)">wikilink</a><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"> embedded in ext link</a> +<p><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"> embedded in ext link</a> </p> !! end @@ -1318,7 +1318,7 @@ Broken link !! input [[Zigzagzogzagzig]] !! result -<p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (not yet written)">Zigzagzogzagzig</a> +<p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a> </p> !! end @@ -1327,7 +1327,7 @@ Broken link with fragment !! input [[Zigzagzogzagzig#zug]] !! result -<p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (not yet written)">Zigzagzogzagzig#zug</a> +<p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a> </p> !! end @@ -1345,7 +1345,7 @@ Nonexistent special page link with fragment !! input [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]] !! result -<p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (not yet written)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a> +<p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a> </p> !! end @@ -1399,7 +1399,7 @@ Link to namespaces !! input [[Talk:Parser testing]], [[Meta:Disclaimers]] !! result -<p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (not yet written)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (not yet written)">Meta:Disclaimers</a> +<p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a> </p> !! end @@ -1408,7 +1408,7 @@ Piped link to namespace !! input [[Meta:Disclaimers|The disclaimers]] !! result -<p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (not yet written)">The disclaimers</a> +<p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a> </p> !! end @@ -1426,7 +1426,7 @@ Link containing % (not as a hex sequence) !! input [[7% Solution]] !! result -<p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (not yet written)">7% Solution</a> +<p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a> </p> !! end @@ -1435,7 +1435,7 @@ Link containing % as a single hex sequence interpreted to char !! input [[7%25 Solution]] !! result -<p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (not yet written)">7% Solution</a> +<p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a> </p> !!end @@ -1481,7 +1481,7 @@ Link containing double-single-quotes '' in text (bug 4598 sanity check) !! input Some [[Link|pretty ''italics'' and stuff]]! !! result -<p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (not yet written)">pretty <i>italics</i> and stuff</a>! +<p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>! </p> !! end @@ -1490,7 +1490,7 @@ Link containing double-single-quotes '' in text embedded in italics (bug 4598 sa !! input ''Some [[Link|pretty ''italics'' and stuff]]! !! result -<p><i>Some </i><a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (not yet written)"><i>pretty </i>italics<i> and stuff</i></a><i>!</i> +<p><i>Some </i><a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)"><i>pretty </i>italics<i> and stuff</i></a><i>!</i> </p> !! end @@ -2171,7 +2171,7 @@ Magic links: internal link to RFC (bug 479) !! input [[RFC 123]] !! result -<p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (not yet written)">RFC 123</a> +<p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a> </p> !! end @@ -2211,7 +2211,7 @@ Nonexistent template !! input {{thistemplatedoesnotexist}} !! result -<p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (not yet written)">Template:Thistemplatedoesnotexist</a> +<p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a> </p> !! end @@ -2393,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 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (not yet written)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (not yet written)">caption</a></div></div></div> +This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div> !! end @@ -3233,7 +3233,7 @@ Add test with existing image page !! input [[:Image:test]] !! result -<p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (not yet written)">Image:test</a> +<p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a> </p> !! end @@ -3442,7 +3442,7 @@ Disabled subpages !! input [[/subpage]] !! result -<p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (not yet written)">/subpage</a> +<p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> </p> !! end @@ -3453,7 +3453,7 @@ subpage title=[[Page]] !! input {{/Subpage}} !! result -<p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (not yet written)">Page/Subpage</a> +<p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a> </p> !! end @@ -4008,7 +4008,7 @@ Image link to nonexistent file (bug 1850 - good) !! input [[:Image:No such.jpg]] !! result -<p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (not yet written)">Image:No such.jpg</a> +<p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a> </p> !! end @@ -5242,7 +5242,7 @@ Special page transclusion !! result <p><br /> </p> -<table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> +<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> !! end @@ -5255,10 +5255,10 @@ Special page transclusion twice (bug 5021) !! result <p><br /> </p> -<table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> +<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> <p><br /> </p> -<table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> +<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> !! end @@ -5276,7 +5276,7 @@ Transclusion of nonexistent MediaWiki message !! input {{MediaWiki:Mainpagexxx}} !!result -<p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (not yet written)">MediaWiki:Mainpagexxx</a> +<p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a> </p> !! end @@ -6178,7 +6178,7 @@ Say the magic word </li><li> Talk </li><li> </li><li> -</li><li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (not yet written)">Template:Dynamic</a> +</li><li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a> </li></ul> !! end @@ -6303,7 +6303,7 @@ Double RFC with a wiki link !! input RFC [[RFC 1234]] !! result -<p>RFC <a href="/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (not yet written)">RFC 1234</a> +<p>RFC <a href="/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a> </p> !! end @@ -6435,7 +6435,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../|L2]] !! result -<p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (not yet written)">L2</a> +<p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a> </p> !! end @@ -6447,7 +6447,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../]] !! result -<p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (not yet written)">Subpage test/L1/L2</a> +<p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a> </p> !! end @@ -6461,7 +6461,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../../|L1]]2 !! result -<p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (not yet written)">L1</a> +<p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a> </p> !! end @@ -6483,7 +6483,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../../////]] !! result -<p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (not yet written)">///</a> +<p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a> </p> !! end @@ -6524,7 +6524,7 @@ RAW magic word !! input {{RAW:QUERTY}} !! result -<p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (not yet written)">Template:QUERTY</a> +<p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a> </p> !! end @@ -7233,6 +7233,64 @@ language=fa </p> !! end +!! test +Multibyte character in padleft +!! input +{{padleft:-Hello|7|Æ}} +!! result +<p>Æ-Hello +</p> +!! end + +!! test +Multibyte character in padright +!! input +{{padright:Hello-|7|Æ}} +!! result +<p>Hello-Æ +</p> +!! end + +!! test +Formatted date +!! config +wgUseDynamicDates=1 +!! input +[[2009-03-24]] +!! result +<p><span class="mw-formatted-date" title="2009-03-24"><a href="/index.php?title=2009&action=edit&redlink=1" class="new" title="2009 (page does not exist)">2009</a>-<a href="/index.php?title=March_24&action=edit&redlink=1" class="new" title="March 24 (page does not exist)">03-24</a></span> +</p> +!!end + +!!test +formatdate parser function +!!input +{{#formatdate:2009-03-24}} +!! result +<p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span> +</p> +!! end + +!!test +formatdate parser function, with default format +!!input +{{#formatdate:2009-03-24|mdy}} +!! result +<p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span> +</p> +!! end + +!! test +Linked date with autoformatting disabled +!! config +wgUseDynamicDates=false +!! input +[[2009-03-24]] +!! result +<p><a href="/index.php?title=2009-03-24&action=edit&redlink=1" class="new" title="2009-03-24 (page does not exist)">2009-03-24</a> +</p> +!!end + # # # |