Ticket #3544: 3544.recursiveincludetest.diff

File 3544.recursiveincludetest.diff, 1.6 KB (added by Johannes Dollinger, 16 years ago)

test for 3544.contexttemplatecache.diff

  • tests/regressiontests/templates/tests.py

     
    611611            'include02': ('{% include "basic-syntax02" %}', {'headline': 'Included'}, "Included"),
    612612            'include03': ('{% include template_name %}', {'template_name': 'basic-syntax02', 'headline': 'Included'}, "Included"),
    613613            'include04': ('a{% include "nonexistent" %}b', {}, "ab"),
     614            'recursive-include': ('{% for item in items %}{{ item.label }}{% if not item.children|length_is:0 %}{% with item.children as items %}({% include "recursive-include" %}){% endwith %}{% endif %}{% endfor %}', {
     615                'items': [
     616                    {'label': 1, 'children': [
     617                        {'label': 2, 'children': [
     618                            {'label': 3, 'children': []},
     619                            {'label': 4, 'children': []},
     620                        ]},
     621                        {'label': 5, 'children': [
     622                             {'label': 6, 'children': [
     623                                 {'label': 7, 'children': [
     624                                     {'label': 8, 'children': []},     
     625                                 ]},
     626                                {'label': 9, 'children': []},   
     627                             ]},
     628                        ]},
     629                    ]},
     630                ],
     631            }, '1(2(34)5(6(7(8)9)))'),
    614632
    615633            ### NAMED ENDBLOCKS #######################################################
    616634
Back to Top