From: Armin Ronacher Date: Mon, 30 Mar 2009 16:50:49 +0000 (+0200) Subject: Added testcase for #335 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1dcafe5d1cba30c82947cda768fe18966b83c41c;p=jinja2.git Added testcase for #335 --HG-- branch : trunk --- diff --git a/tests/test_old_bugs.py b/tests/test_old_bugs.py index 687d962..f77e60c 100644 --- a/tests/test_old_bugs.py +++ b/tests/test_old_bugs.py @@ -8,7 +8,8 @@ :copyright: (c) 2009 by the Jinja Team. :license: BSD. """ -from jinja2 import Environment, DictLoader +from py.test import raises +from jinja2 import Environment, DictLoader, TemplateSyntaxError def test_keyword_folding(): @@ -53,3 +54,9 @@ def test_loop_call_loop(env): ''') assert tmpl.render() == '' + + +def test_weird_inline_comment(): + env = Environment(line_statement_prefix='%') + raises(TemplateSyntaxError, env.from_string, + '% for item in seq {# missing #}\n...% endfor')