From 1dcafe5d1cba30c82947cda768fe18966b83c41c Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 30 Mar 2009 18:50:49 +0200 Subject: [PATCH] Added testcase for #335 --HG-- branch : trunk --- tests/test_old_bugs.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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') -- 2.26.2