From: Alexandre Emsenhuber Date: Wed, 26 Aug 2009 16:57:53 +0000 (+0000) Subject: Added parser test for r55601, has to clear MagicWord's object caching so that parser... X-Git-Tag: 1.31.0-rc.0~40048 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=4de1c6751d9d2b25935d30909695016454376deb;p=lhc%2Fweb%2Fwiklou.git Added parser test for r55601, has to clear MagicWord's object caching so that parser function aliases are also available when using a different language that English --- diff --git a/includes/MagicWord.php b/includes/MagicWord.php index f618d9f965..991a286805 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -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; diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 94055f8caa..8525594b71 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -673,6 +673,8 @@ class ParserTest { //$GLOBALS['wgMessageCache'] = new MessageCache( new BagOStuff(), false, 0, $GLOBALS['wgDBname'] ); + MagicWord::clearCache(); + global $wgUser; $wgUser = new User(); } diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index c94203b9b5..9faf4e5976 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -7028,6 +7028,32 @@ Bug 5678: Double-parsed template invocation

!! 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 +

Ěščř +Ěščř +ěščř +ěščř +ěščř +ěščř +ĚŠČŘ +ĚŠČŘ +

+!! end + !! test Morwen/13: Unclosed link followed by heading !! input