Added parser test for r55601, has to clear MagicWord's object caching so that parser...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 26 Aug 2009 16:57:53 +0000 (16:57 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 26 Aug 2009 16:57:53 +0000 (16:57 +0000)
includes/MagicWord.php
maintenance/parserTests.inc
maintenance/parserTests.txt

index f618d9f..991a286 100644 (file)
@@ -230,6 +230,14 @@ class MagicWord {
                return self::$mDoubleUnderscoreArray;
        }
 
+       /**
+        * Clear the self::$mObjects variable
+        * For use in parser tests
+        */
+       public static function clearCache() {
+               self::$mObjects = array();
+       }
+
        # Initialises this object with an ID
        function load( $id ) {
                global $wgContLang;
index 94055f8..8525594 100644 (file)
@@ -673,6 +673,8 @@ class ParserTest {
 
                //$GLOBALS['wgMessageCache'] = new MessageCache( new BagOStuff(), false, 0, $GLOBALS['wgDBname'] );
 
+               MagicWord::clearCache();
+
                global $wgUser;
                $wgUser = new User();
        }
index c94203b..9faf4e5 100644 (file)
@@ -7028,6 +7028,32 @@ Bug 5678: Double-parsed template invocation
 </p>
 !! end
 
+!! test
+Case insensitivity of parser functions for non-ASCII characters (bug 8143)
+!! options
+language=cs
+title=[[Main Page]]
+!! input
+{{PRVNÍVELKÉ:ěščř}}
+{{prvnívelké:ěščř}}
+{{PRVNÍMALÉ:ěščř}}
+{{prvnímalé:ěščř}}
+{{MALÁ:ěščř}}
+{{malá:ěščř}}
+{{VELKÁ:ěščř}}
+{{velká:ěščř}}
+!! result
+<p>Ěščř
+Ěščř
+ěščř
+ěščř
+ěščř
+ěščř
+ĚŠČŘ
+ĚŠČŘ
+</p>
+!! end
+
 !! test
 Morwen/13: Unclosed link followed by heading
 !! input