SyntaxAndOutput.py (cheetah3-3.2.5) | : | SyntaxAndOutput.py (cheetah3-3.2.6) | ||
---|---|---|---|---|
skipping to change at line 2987 | skipping to change at line 2987 | |||
""" | """ | |||
self.verify("$getVar('bogus', 1234)", | self.verify("$getVar('bogus', 1234)", | |||
"1234") | "1234") | |||
def test5(self): | def test5(self): | |||
"""$getVar('$bogus', 1234) | """$getVar('$bogus', 1234) | |||
""" | """ | |||
self.verify("$getVar('$bogus', 1234)", | self.verify("$getVar('$bogus', 1234)", | |||
"1234") | "1234") | |||
def test6(self): | ||||
"""$getVar('$') raises ValueError | ||||
""" | ||||
with self.assertRaises(ValueError): | ||||
self.verify("$getVar('$')", "never get here") | ||||
class MiscComplexSyntax(OutputTest): | class MiscComplexSyntax(OutputTest): | |||
def test1(self): | def test1(self): | |||
"""Complex use of {},[] and () in a #set expression | """Complex use of {},[] and () in a #set expression | |||
---- | ---- | |||
#set $c = {'A':0}[{}.get('a', {'a' : 'A'}['a'])] | #set $c = {'A':0}[{}.get('a', {'a' : 'A'}['a'])] | |||
$c | $c | |||
""" | """ | |||
self.verify("#set $c = {'A':0}[{}.get('a', {'a' : 'A'}['a'])]\n$c", | self.verify("#set $c = {'A':0}[{}.get('a', {'a' : 'A'}['a'])]\n$c", | |||
"0") | "0") | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 6 lines changed or added |