Date: Thu, 23 Sep 2004 05:59:27 +0000 (+0000)
Subject: Split up internal links test cases, add a couple more
X-Git-Tag: 1.5.0alpha1~1859
X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=33fd1f40750eb175b2c7e576700e6698bf218702;p=lhc%2Fweb%2Fwiklou.git
Split up internal links test cases, add a couple more
---
diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt
index 002bcf3565..186b95199e 100644
--- a/maintenance/parserTests.txt
+++ b/maintenance/parserTests.txt
@@ -377,48 +377,121 @@ Normal text.
### Internal links
###
!! test
-Internal links
+Plain link, capitalized
!! input
-Plain link, capitalized: [[Main Page]]
+[[Main Page]]
+!! result
+Main Page
+
+!! end
-Plain link, uncapitalized: [[main Page]]
+!! test
+Plain link, uncapitalized
+!! input
+[[main Page]]
+!! result
+main Page
+
+!! end
-Piped link: [[Main Page|The Main Page]]
+!! test
+Piped link
+!! input
+[[Main Page|The Main Page]]
+!! result
+The Main Page
+
+!! end
-Broken link: [[Zigzagzogzagzig]]
+!! test
+Broken link
+!! input
+[[Zigzagzogzagzig]]
+!! result
+Zigzagzogzagzig
+
+!! end
-Link with prefix: xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
+!! test
+Link with prefix
+!! input
+xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
+!! result
+xxxmain Page, xxxMain Page, Xxxmain Page XXXmain Page, XXXMain Page
+
+!! end
-Link with suffix: [[Main Page]]xxx, [[Main Page]]XXX
+!! test
+Link with suffix
+!! input
+[[Main Page]]xxx, [[Main Page]]XXX
+!! result
+Main Pagexxx, Main PageXXX
+
+!! end
-Link with 3 brackets: [[[main page]]]
+!! test
+Link with 3 brackets
+!! input
+[[[main page]]]
+!! result
+[[[main page]]]
+
+!! end
-Piped link with 3 brackets: [[[main page|the main page]]]
+!! test
+Piped link with 3 brackets
+!! input
+[[[main page|the main page]]]
+!! result
+[[[main page|the main page]]]
+
+!! end
-Link to namespaces: [[Talk:Parser testing]], [[Meta:Disclaimers]]
+!! test
+Link to namespaces
+!! input
+[[Talk:Parser testing]], [[Meta:Disclaimers]]
+!! result
+Talk:Parser testing, Meta:Disclaimers
+
+!! end
-Piped link to namespace: [[Meta:Disclaimers|The disclaimers]]
+!! test
+Piped link to namespace
+!! input
+[[Meta:Disclaimers|The disclaimers]]
+!! result
+The disclaimers
+
+!! end
-Link to category: [[:Category:MediaWiki User's Guide]]
+!! test
+Link to category
+!! input
+[[:Category:MediaWiki User's Guide]]
+!! result
+Category:MediaWiki User's Guide
+
+!! end
-Link to image page: [[:Image:Ncwikicol.png]]
+!! test
+Link to image page
+!! input
+[[:Image:Ncwikicol.png]]
+!! result
+Image:Ncwikicol.png
+
+!! end
-Plain link to URL: [[http://www.example.org]]
+!! test
+Plain link to URL
+!! input
+[[http://www.example.org]]
!! result
-Plain link, capitalized: Main Page
-
Plain link, uncapitalized: main Page
-
Piped link: The Main Page
-
Broken link: Zigzagzogzagzig
-
Link with prefix: xxxmain Page, xxxMain Page, Xxxmain Page XXXmain Page, XXXMain Page
-
Link with suffix: Main Pagexxx, Main PageXXX
-
Link with 3 brackets: [[[main page]]]
-
Piped link with 3 brackets: [[[main page|the main page]]]
-
Link to namespaces: Talk:Parser testing, Meta:Disclaimers
-
Piped link to namespace: The disclaimers
-
Link to category: Category:MediaWiki User's Guide
-
Link to image page: Image:Ncwikicol.png
-
Plain link to URL: [[1] (http://www.example.org)]
+
[[1] (http://www.example.org)]
+!! end
!! test
Piped link to URL
@@ -438,3 +511,32 @@ BUG 2: [[page|http://url/]] should link to page, not http://url/