From 456b8a9d0c3c4cbff2e3d88b659c6e4e3e6c7def Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 27 Jan 2011 02:28:53 +0000 Subject: [PATCH] Fixed #14818 -- Added explicit tests for the way that the cycle tag handles escaping. Thanks to steveire. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15335 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/templates/tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py index 08957b0417..397f88943e 100644 --- a/tests/regressiontests/templates/tests.py +++ b/tests/regressiontests/templates/tests.py @@ -693,6 +693,8 @@ class Templates(unittest.TestCase): 'cycle17': ("{% cycle 'a' 'b' 'c' as abc silent %}{% cycle abc %}{% cycle abc %}{% cycle abc %}{% cycle abc %}", {}, "abca"), 'cycle18': ("{% cycle 'a' 'b' 'c' as foo invalid_flag %}", {}, template.TemplateSyntaxError), 'cycle19': ("{% cycle 'a' 'b' as silent %}{% cycle silent %}", {}, "ab"), + 'cycle20': ("{% cycle one two as foo %} & {% cycle foo %}", {'one' : 'A & B', 'two' : 'C & D'}, "A & B & C & D"), + 'cycle21': ("{% filter force_escape %}{% cycle one two as foo %} & {% cycle foo %}{% endfilter %}", {'one' : 'A & B', 'two' : 'C & D'}, "A & B & C & D"), ### EXCEPTIONS ############################################################