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: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?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