summaryrefslogtreecommitdiff
path: root/test/test_template.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-03-05 02:18:14 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-03-05 02:18:14 +0000
commit63cec67ec5058778226c74906d8521b17811b9e5 (patch)
tree6d3186bfe0e8956f2513fe229a7ee74d35b2b32f /test/test_template.py
parent2bc0ea9cebeda00b0b23d633ee87cbc819829fd8 (diff)
downloadmako-63cec67ec5058778226c74906d8521b17811b9e5.tar.gz
- Template accepts empty control structure, i.e.
% if: %endif, etc. [ticket:94] - finished cleanup for codegen.py, [ticket:98]
Diffstat (limited to 'test/test_template.py')
-rw-r--r--test/test_template.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test_template.py b/test/test_template.py
index 970565a..204ee3b 100644
--- a/test/test_template.py
+++ b/test/test_template.py
@@ -509,7 +509,17 @@ class ControlTest(TemplateTest):
"no x does not have test",
"yes x has test"
]
-
+
+ def test_blank_control(self):
+ self._do_memory_test(
+ """
+ % if True:
+ % endif
+ """,
+ "",
+ filters=lambda s:s.strip()
+ )
+
def test_multiline_control(self):
t = Template("""
% for x in \\