diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-03-08 16:02:05 -0800 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-03-08 16:02:05 -0800 |
commit | 936a524263b90071d601b09a63f3c86117769b61 (patch) | |
tree | 579e966b009b9b0aa1436cf0bc2754abe76220f8 /test/test_call.py | |
parent | 2f022a271212b220519305649e6a8490cf4399ff (diff) | |
download | external_python_mako-936a524263b90071d601b09a63f3c86117769b61.tar.gz external_python_mako-936a524263b90071d601b09a63f3c86117769b61.tar.bz2 external_python_mako-936a524263b90071d601b09a63f3c86117769b61.zip |
- [bug] Fixed endless recursion bug when
nesting multiple def-calls with content.
Thanks to Jeff Dairiki. [ticket:186]
Diffstat (limited to 'test/test_call.py')
-rw-r--r-- | test/test_call.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_call.py b/test/test_call.py index 5f13e95..0bb6079 100644 --- a/test/test_call.py +++ b/test/test_call.py @@ -385,6 +385,17 @@ class CallTest(TemplateTest): """) assert result_lines(t.render()) == ['this is a', 'this is b', 'this is c:', "this is the body in b's call"] + def test_composed_def(self): + t = Template(""" + <%def name="f()"><f>${caller.body()}</f></%def> + <%def name="g()"><g>${caller.body()}</g></%def> + <%def name="fg()"> + <%self:f><%self:g>${caller.body()}</%self:g></%self:f> + </%def> + <%self:fg>fgbody</%self:fg> + """) + assert result_lines(t.render()) == ['<f><g>fgbody</g></f>'] + def test_regular_defs(self): t = Template(""" <%! |