From: Armin Ronacher Date: Sun, 14 Mar 2010 23:03:25 +0000 (+0100) Subject: Added a new testcase for something that is supposed to be a bug. X-Git-Tag: 2.4~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3e6bc41190b79dc8c9d502436c8a226b60e6f5a;p=thirdparty%2Fjinja.git Added a new testcase for something that is supposed to be a bug. --HG-- branch : trunk --- diff --git a/jinja2/testsuite/core_tags.py b/jinja2/testsuite/core_tags.py index e4d105a6..d456b4f9 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()