From: Mark Holmquist Date: Fri, 15 Mar 2013 16:27:35 +0000 (-0700) Subject: Add tests for case-(in)sensitive magic words X-Git-Tag: 1.31.0-rc.0~20251^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=1ce2431c40620c3193be2cb01834ec598e02c586;p=lhc%2Fweb%2Fwiklou.git Add tests for case-(in)sensitive magic words Parsoid needs these to make sure it doesn't regress along these lines, and for some reason they aren't tested anywhere else. Change-Id: Id8fd91b0d36d31f9bb209aa4088f1e28cadbd7ca --- diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 251bf23d4e..aeadee7580 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -4717,6 +4717,36 @@ Magic Word: {{SITENAME}}

!! end +!! test +Case-sensitive magic words, when cased differently, should just be template transclusions +!! input +{{CurrentMonth}} +{{currentday}} +{{cURreNTweEK}} +{{currentHour}} +!! result +

Template:CurrentMonth +Template:Currentday +Template:CURreNTweEK +Template:CurrentHour +

+!! end + +!! test +Case-insensitive magic words should still work with weird casing. +!! input +{{sErVeRNaMe}} +{{LCFirst:AOEU}} +{{ucFIRST:aoeu}} +{{SERver}} +!! result +

example.org +aOEU +Aoeu +http://example.org +

+!! end + !! test Namespace 1 {{ns:1}} !! input