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
This commit is contained in:
Russell Keith-Magee 2011-01-27 02:28:53 +00:00
parent 7012042544
commit 456b8a9d0c
1 changed files with 2 additions and 0 deletions

View File

@ -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 ############################################################