implicit tuple expressions can no longer be totally empty.
[jinja2.git] / tests / test_old_bugs.py
index e3a403bdd5d075c935ab7ba2e969532bbe551a76..98db1b3b33cbb1cf675bb3f1e011b78c3362d2e7 100644 (file)
@@ -134,3 +134,9 @@ def test_call_with_args():
         u'</dl>',
         u'</li></ul>'
     ]
+
+
+def test_empty_if_condition_fails():
+    assert_raises(TemplateSyntaxError, Template, '{% if %}....{% endif %}')
+    assert_raises(TemplateSyntaxError, Template, '{% if foo %}...{% elif %}...{% endif %}')
+    assert_raises(TemplateSyntaxError, Template, '{% for x in %}..{% endfor %}')