Ticket #2594: template_whitespace_ticket_2594_tests.diff
File template_whitespace_ticket_2594_tests.diff, 2.1 KB (added by , 15 years ago) |
---|
-
regressiontests/templates/tests.py
965 965 'templatetag10': ('{% templatetag closebrace %}{% templatetag closebrace %}', {}, '}}'), 966 966 'templatetag11': ('{% templatetag opencomment %}', {}, '{#'), 967 967 'templatetag12': ('{% templatetag closecomment %}', {}, '#}'), 968 968 969 # WHITESPACE TESTING 970 # Tags on their own line should collapse the newline before them 971 'templatetag-whitespace01': ('\n {% templatetag openblock %}\n', {}, '{%\n'), 972 # Tags that start on a newline, but have content thereafter, should not collapse the newline before or after them. 973 'templatetag-whitespace02': ('\n {% templatetag openblock %} String', {}, '\n {% String'), 974 'templatetag-whitespace03': ('\n {% templatetag openblock %} String \n', {}, '\n {% String \n'), 975 'templatetag-whitespace04': ('\n {% templatetag openbrace %}\nString\n{% templatetag closebrace %}\n', {}, '{\nString}\n'), 976 'templatetag-whitespace05': ('\n {% templatetag openbrace %}String{% templatetag closebrace %}\n', {}, '\n {String}\n'), 977 'templatetag-whitespace06': ('\n {% templatetag openbrace %}String{% templatetag closebrace %}', {}, '\n {String}'), 978 'templatetag-whitespace07': (' {% templatetag openbrace %}String{% templatetag closebrace %}', {}, ' {String}'), 979 969 980 ### WIDTHRATIO TAG ######################################################## 970 981 'widthratio01': ('{% widthratio a b 0 %}', {'a':50,'b':100}, '0'), 971 982 'widthratio02': ('{% widthratio a b 100 %}', {'a':0,'b':0}, ''), … … 1082 1093 # implementation details (fortunately, the (no)autoescape block 1083 1094 # tags can be used in those cases) 1084 1095 'autoescape-filtertag01': ("{{ first }}{% filter safe %}{{ first }} x<y{% endfilter %}", {"first": "<a>"}, template.TemplateSyntaxError), 1096 1085 1097 } 1086 1098 1087 1099 if __name__ == "__main__":