implicit tuple expressions can no longer be totally empty.
This change makes ``{% if %}...{% endif %}`` a syntax error
now. (#364)
--HG--
branch : trunk
diff --git a/tests/test_old_bugs.py b/tests/test_old_bugs.py
index e3a403b..98db1b3 100644
--- a/tests/test_old_bugs.py
+++ b/tests/test_old_bugs.py
@@ -134,3 +134,9 @@
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 %}')