Ticket #2800: ifchanged-tests.patch
File ifchanged-tests.patch, 1.4 KB (added by , 18 years ago) |
---|
-
tests/regressiontests/templates/tests.py
310 310 'ifchanged06': ('{% for n in num %}{% ifchanged %}{{ n }}{% endifchanged %}{% for x in numx %}{% ifchanged %}{{ x }}{% endifchanged %}{% endfor %}{% endfor %}', { 'num': (1, 1, 1), 'numx': (2, 2, 2)}, '1222'), 311 311 'ifchanged07': ('{% for n in num %}{% ifchanged %}{{ n }}{% endifchanged %}{% for x in numx %}{% ifchanged %}{{ x }}{% endifchanged %}{% for y in numy %}{% ifchanged %}{{ y }}{% endifchanged %}{% endfor %}{% endfor %}{% endfor %}', { 'num': (1, 1, 1), 'numx': (2, 2, 2), 'numy': (3, 3, 3)}, '1233323332333'), 312 312 313 'ifchanged-param01': ('{% for n in num %}{% ifchanged n %}..{% endifchanged %}{{n}}{% endfor %}', { 'num': (1,2,3) }, '..1..2..3'), 314 'ifchanged-param01': ('{% for n in num %}{% for x in numx %}{% ifchanged n %}..{% endifchanged %}{{x}}{% endfor %}{% endfor %}', { 'num': (1,2,3), 'numx': (5,6,7) }, '..567..567..567'), 315 313 316 ### IFEQUAL TAG ########################################################### 314 317 'ifequal01': ("{% ifequal a b %}yes{% endifequal %}", {"a": 1, "b": 2}, ""), 315 318 'ifequal02': ("{% ifequal a b %}yes{% endifequal %}", {"a": 1, "b": 1}, "yes"),