Ticket #14126: test14126.patch

File test14126.patch, 1.3 KB (added by Matthias Kestenholz, 14 years ago)
  • tests/regressiontests/templates/tests.py

    diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
    index 9e2d175..2047d70 100644
    a b class Templates(unittest.TestCase):  
    11191119            # translation of plural form with extra field in singular form (#13568)
    11201120            'i18n26': ('{% load i18n %}{% blocktrans with myextra_field as extra_field count number as counter %}singular {{ extra_field }}{% plural %}plural{% endblocktrans %}', {'number': 1, 'myextra_field': 'test'}, "singular test"),
    11211121
     1122            # test example from the documentation (#14126)
     1123            'i18n27': ('{% load i18n %}{% blocktrans with myextra_field as extra_field count number_list|length as counter %}singular {{ extra_field }}{% plural %}plural{% endblocktrans %}', {'number_list': [1], 'myextra_field': 'test'}, "singular test"),
     1124            'i18n28': ('{% load i18n %}{% blocktrans with myextra_field as extra_field count number_list|length as counter %}singular {{ extra_field }}{% plural %}plural{% endblocktrans %}', {'number_list': [1, 2], 'myextra_field': 'test'}, "plural"),
     1125
    11221126            ### HANDLING OF TEMPLATE_STRING_IF_INVALID ###################################
    11231127
    11241128            'invalidstr01': ('{{ var|default:"Foo" }}', {}, ('Foo','INVALID')),
Back to Top