From d3e6bc41190b79dc8c9d502436c8a226b60e6f5a Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 15 Mar 2010 00:03:25 +0100 Subject: [PATCH] Added a new testcase for something that is supposed to be a bug. --HG-- branch : trunk --- jinja2/testsuite/core_tags.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jinja2/testsuite/core_tags.py b/jinja2/testsuite/core_tags.py index e4d105a..d456b4f 100644 --- a/jinja2/testsuite/core_tags.py +++ b/jinja2/testsuite/core_tags.py @@ -271,6 +271,12 @@ class MacrosTestCase(JinjaTestCase): assert tmpl.module.bar.catch_varargs assert tmpl.module.baz.caller + def test_callself(self): + tmpl = self.env.from_string('{% macro foo(x) %}{{ x }}{% if x > 1 %}|' + '{{ foo(x - 1) }}{% endif %}{% endmacro %}' + '{{ foo(5) }}') + assert tmpl.render() == '5|4|3|2|1' + def suite(): suite = unittest.TestSuite() -- 2.26.2