summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2017-01-24 20:16:20 +0100
committerArmin Ronacher <armin.ronacher@active-4.com>2017-01-24 20:16:20 +0100
commitd927c887507cfc700c9439f01aa14cee47afd4fd (patch)
tree740bf9c766eb8dde23ef10550ea97f1a6ade710a /tests
parent0fcf45162d72c205568afcc3407c16037a82b6de (diff)
parentca124c5cfe69ea695ac4caa05d0acb611de52adf (diff)
downloadjinja2-d927c887507cfc700c9439f01aa14cee47afd4fd.tar.gz
Merge branch '2.9-maintenance'
Diffstat (limited to 'tests')
-rw-r--r--tests/test_regression.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_regression.py b/tests/test_regression.py
index e6a2f0c..f2314de 100644
--- a/tests/test_regression.py
+++ b/tests/test_regression.py
@@ -520,3 +520,9 @@ class TestBug(object):
assert x.resolve_or_missing('foo') == 42
assert x.resolve_or_missing('bar') == 23
assert x.resolve_or_missing('baz') is missing
+
+ def test_recursive_loop_bug(self, env):
+ tmpl = env.from_string('''
+ {%- for value in values recursive %}1{% else %}0{% endfor -%}
+ ''')
+ assert tmpl.render(values=[]) == '0'