Added a test that 'firstof' template filter doesn't auto-escape. cycle tag already has such a test (cycle20). Refs #10912

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2011-12-09 19:52:20 +00:00
parent 08bec4fbc1
commit 9b93f1c01c
1 changed files with 1 additions and 0 deletions

View File

@ -788,6 +788,7 @@ class Templates(unittest.TestCase):
'firstof07': ('{% firstof a b "c" %}', {'a':0}, 'c'), 'firstof07': ('{% firstof a b "c" %}', {'a':0}, 'c'),
'firstof08': ('{% firstof a b "c and d" %}', {'a':0,'b':0}, 'c and d'), 'firstof08': ('{% firstof a b "c and d" %}', {'a':0,'b':0}, 'c and d'),
'firstof09': ('{% firstof %}', {}, template.TemplateSyntaxError), 'firstof09': ('{% firstof %}', {}, template.TemplateSyntaxError),
'firstof10': ('{% firstof a %}', {'a': '<'}, '<'), # Variables are NOT auto-escaped.
### FOR TAG ############################################################### ### FOR TAG ###############################################################
'for-tag01': ("{% for val in values %}{{ val }}{% endfor %}", {"values": [1, 2, 3]}, "123"), 'for-tag01': ("{% for val in values %}{{ val }}{% endfor %}", {"values": [1, 2, 3]}, "123"),