From 1ce2431c40620c3193be2cb01834ec598e02c586 Mon Sep 17 00:00:00 2001 From: Mark Holmquist Date: Fri, 15 Mar 2013 09:27:35 -0700 Subject: [PATCH] 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 --- tests/parser/parserTests.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 251bf23d4ea..aeadee75809 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -4718,6 +4718,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 {{ns:1}} -- 2.11.4.GIT