From: Mark Holmquist
Date: Wed, 26 Sep 2012 20:10:20 +0000 (-0700)
Subject: Adding a few tests for categories
X-Git-Tag: 1.31.0-rc.0~22264^2
X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=a5fd4908872ea971a1479b89718f34c11d4ca4c6;p=lhc%2Fweb%2Fwiklou.git
Adding a few tests for categories
There wasn't really a test for sort keys, but we need those for
the Parsoid round-trip testing. So here they are!
Change-Id: If1fd948d1937872b9604b08c85b11595276f2808
---
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index b667beb8c1..dacc726ad5 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -5576,6 +5576,48 @@ PAGESINCATEGORY invalid title fatal (r33546 fix)
!! end
+!! test
+Category with different sort key
+!! options
+cat
+!! input
+[[Category:MediaWiki User's Guide|Foo]]
+!! result
+MediaWiki User's Guide
+!! end
+
+!! test
+Category with identical sort key
+!! options
+cat
+!! input
+[[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
+!! result
+MediaWiki User's Guide
+!! end
+
+!! test
+Category with empty sort key
+!! options
+cat
+pst
+!! input
+[[Category:MediaWiki User's Guide|]]
+!! result
+[[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
+!! end
+
+!! test
+Category with empty sort key and parentheses
+!! options
+cat
+pst
+!! input
+[[Category:Foo (bar)|]]
+!! result
+[[Category:Foo (bar)|Foo]]
+!! end
+
###
### Inter-language links
###