From a5fd4908872ea971a1479b89718f34c11d4ca4c6 Mon Sep 17 00:00:00 2001
From: Mark Holmquist
Date: Wed, 26 Sep 2012 13:10:20 -0700
Subject: [PATCH] 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
---
tests/parser/parserTests.txt | 42 ++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
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
###
--
2.20.1