test switch with template call as default
authorralf@brainbot.com
Tue Nov 18 12:29:57 2008 +0100 (6 weeks ago)
changeset 17951c80827ae586
parent 1794946e1f776e1c
child 17965546dcb2bd5c
test switch with template call as default
tests/test_expander.py
       1 --- a/tests/test_expander.py	Tue Nov 18 11:31:31 2008 +0100
       2 +++ b/tests/test_expander.py	Tue Nov 18 12:29:57 2008 +0100
       3 @@ -361,3 +361,6 @@
       4      wikidb = DictDB(MONTHNUMBER="{{#if:{{{1|}}}|{{#switch:{{lc:{{{1}}}}}|january|jan=1|february|feb=2|march|mar=3|apr|april=4|may=5|june|jun=6|july|jul=7|august|aug=8|september|sep=9|october|oct=10|november|nov=11|december|dec=12|{{#ifexpr:{{{1}}}<0|{{#ifexpr:(({{{1}}})round 0)!=({{{1}}})|{{#expr:12-(((0.5-({{{1}}}))round 0)mod 12)}}|{{#expr:12-(((11.5-({{{1}}}))round 0)mod 12)}}}}|{{#expr:(((10.5+{{{1}}})round 0)mod 12)+1}}}}}}|Missing required parameter 1=''month''!}}")
       5  
       6      expandstr("{{MONTHNUMBER|12}}", "12", wikidb=wikidb)
       7 +
       8 +def test_switch_default_template():
       9 +    expandstr("{{#switch:1|{{#if:0|5|12}}}}", "12")