aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_call.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_call.py')
-rw-r--r--test/test_call.py11
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("""
<%!