Ticket #18526: t18526__failing_test_case.2.diff

File t18526__failing_test_case.2.diff, 1.9 KB (added by Gregor Müllegger, 12 years ago)

This problem affects even more tags …

  • tests/regressiontests/templates/tests.py

    diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
    index 35d0122..626b32f 100644
    a b class Templates(unittest.TestCase):  
    754754            'cycle23': ("{% for x in values %}{% cycle 'a' 'b' 'c' as abc silent %}{{ abc }}{{ x }}{% endfor %}", {'values': [1,2,3,4]}, "a1b2c3a4"),
    755755            'included-cycle': ('{{ abc }}', {'abc': 'xxx'}, 'xxx'),
    756756            'cycle24': ("{% for x in values %}{% cycle 'a' 'b' 'c' as abc silent %}{% include 'included-cycle' %}{% endfor %}", {'values': [1,2,3,4]}, "abca"),
     757            'cycle24': ("{% for x in values %}{% cycle a b|default:'empty' %}{% endfor %}", {'values': [1,2]}, "empty"),
    757758
    758759            ### EXCEPTIONS ############################################################
    759760
    class Templates(unittest.TestCase):  
    14701471            'legacywith02': ('{{ key }}{% with dict.key as key %}{{ key }}-{{ dict.key }}-{{ key }}{% endwith %}{{ key }}', {'dict': {'key': 50}}, ('50-50-50', 'INVALID50-50-50INVALID')),
    14711472
    14721473            'with03': ('{% with a=alpha b=beta %}{{ a }}{{ b }}{% endwith %}', {'alpha': 'A', 'beta': 'B'}, 'AB'),
     1474            'with04': ('{% with const="constant" %}{{ const }}{% endwith %}', {}, 'constant'),
     1475
     1476            # don't change semantics by using the with tag
     1477            'with05': ('{{ a }}{% if a == "" %}A{% endif %}{% with b=a %}{{ b }}{% if b == "" %}b{% endif %}{% endwith %}', {}, ('', 'INVALIDINVALID')),
     1478            'with06': ('{{ a }}{% if a == "" %}A{% endif %}{% with b=a|default:"" %}{{ b }}{% if b == "" %}b{% endif %}{% endwith %}', {}, ('b', 'INVALIDb')),
    14731479
    14741480            'with-error01': ('{% with dict.key xx key %}{{ key }}{% endwith %}', {'dict': {'key': 50}}, template.TemplateSyntaxError),
    14751481            'with-error02': ('{% with dict.key as %}{{ key }}{% endwith %}', {'dict': {'key': 50}}, template.TemplateSyntaxError),
Back to Top