Ticket #14818: test_cycle.patch

File test_cycle.patch, 998 bytes (added by Stephen Kelly, 14 years ago)

Tests for documented behaviour

  • tests/regressiontests/templates/tests.py

     
    639639            'cycle17': ("{% cycle 'a' 'b' 'c' as abc silent %}{% cycle abc %}{% cycle abc %}{% cycle abc %}{% cycle abc %}", {}, "abca"),
    640640            'cycle18': ("{% cycle 'a' 'b' 'c' as foo invalid_flag %}", {}, template.TemplateSyntaxError),
    641641            'cycle19': ("{% cycle 'a' 'b' as silent %}{% cycle silent %}", {}, "ab"),
     642            'cycle20': ("{% cycle one two as foo %} & {% cycle foo %}", {'one' : 'A & B', 'two' : 'C & D'}, "A & B & C & D"),
     643            'cycle21': ("{% filter force_escape %}{% cycle one two as foo %} & {% cycle foo %}{% endfilter %}", {'one' : 'A & B', 'two' : 'C & D'}, "A & B & C & D"),
    642644
    643645            ### EXCEPTIONS ############################################################
    644646
Back to Top