From: Ævar Arnfjörð Bjarmason Date: Sun, 8 Jan 2006 22:33:07 +0000 (+0000) Subject: * Magic Word testcases, not all of them and the namespace stuff is broken (& disabled) X-Git-Tag: 1.6.0~670 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=c2c5261e51e3c6743d09b27eee7cfbebfbd99f9a;p=lhc%2Fweb%2Fwiklou.git * Magic Word testcases, not all of them and the namespace stuff is broken (& disabled) --- diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index ddb65810db..ad22882819 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -1327,10 +1327,233 @@ List items are not parsed correctly following a
 block (bug 785)
 !! end
 
 ###
-### Magic variables
+### Magic Words
 ###
+
+!! test
+Magic Word: {{CURRENTDAY}}
+!! input
+{{CURRENTDAY}}
+!! result
+

1 +

+!! end + +!! test +Magic Word: {{CURRENTDAY2}} +!! input +{{CURRENTDAY2}} +!! result +

01 +

+!! end + +!! test +Magic Word: {{CURRENTDAYNAME}} +!! input +{{CURRENTDAYNAME}} +!! result +

Thursday +

+!! end + +!! test +Magic Word: {{CURRENTDOW}} +!! input +{{CURRENTDOW}} +!! result +

4 +

+!! end + +!! test +Magic Word: {{CURRENTMONTH}} +!! input +{{CURRENTMONTH}} +!! result +

01 +

+!! end + +!! test +Magic Word: {{CURRENTMONTHABBREV}} +!! input +{{CURRENTMONTHABBREV}} +!! result +

Jan +

+!! end + +!! test +Magic Word: {{CURRENTMONTHNAME}} +!! input +{{CURRENTMONTHNAME}} +!! result +

January +

+!! end + +!! test +Magic Word: {{CURRENTMONTHNAMEGEN}} +!! input +{{CURRENTMONTHNAMEGEN}} +!! result +

January +

+!! end + +!! test +Magic Word: {{CURRENTTIME}} +!! input +{{CURRENTTIME}} +!! result +

00:02 +

+!! end + +!! test +Magic Word: {{CURRENTWEEK}} +!! input +{{CURRENTWEEK}} +!! result +

01 +

+!! end + +!! test +Magic Word: {{CURRENTYEAR}} +!! input +{{CURRENTYEAR}} +!! result +

1970 +

+!! end + +!! test +Magic Word: {{FULLPAGENAME}} +!! options +title=[[User:Ævar Arnfjörð Bjarmason]] +!! input +{{FULLPAGENAME}} +!! result +

User:Ævar Arnfjörð Bjarmason +

+!! end + +!! test +Magic Word: {{FULLPAGENAMEE}} +!! options +title=[[User:Ævar Arnfjörð Bjarmason]] +!! input +{{FULLPAGENAMEE}} +!! result +

User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason +

+!! end + +!! test +Magic Word: {{NAMESPACE}} +!! options +title=[[User:Ævar Arnfjörð Bjarmason]] +disabled # FIXME +!! input +{{NAMESPACE}} +!! result +

User +

+!! end + +!! test +Magic Word: {{NAMESPACEE}} +!! options +title=[[User:Ævar Arnfjörð Bjarmason]] +disabled # FIXME +!! input +{{NAMESPACEE}} +!! result +

User +

+!! end + +!! test +Magic Word: {{NUMBEROFARTICLES}} +!! input +{{NUMBEROFARTICLES}} +!! result +

-1 +

+!! end + +!! test +Magic Word: {{NUMBEROFFILES}} +!! input +{{NUMBEROFFILES}} +!! result +

1 +

+!! end + +!! test +Magic Word: {{PAGENAME}} +!! options +title=[[User:Ævar Arnfjörð Bjarmason]] +disabled # FIXME +!! input +{{PAGENAME}} +!! result +

Ævar Arnfjörð Bjarmason +

+!! end + +!! test +Magic Word: {{PAGENAMEE}} +!! options +title=[[User:Ævar Arnfjörð Bjarmason]] +!! input +{{PAGENAMEE}} +!! result +

User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason +

+!! end + +!! test +Magic Word: {{REVISIONID}} +!! input +{{REVISIONID}} +!! result +

1337 +

+!! end + +!! test +Magic Word: {{SCRIPTPATH}} +!! input +{{SCRIPTPATH}} +!! result +

/ +

+!! end + +!! test +Magic Word: {{SERVER}} +!! input +{{SERVER}} +!! result +

http://localhost +

+!! end + +!! test +Magic Word: {{SERVERNAME}} +!! input +{{SERVERNAME}} +!! result +

Britney Spears +

+!! end + !! test -Magic variables +Magic Word: {{SITENAME}} !! input {{SITENAME}} !! result