diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-06-07 09:59:14 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-06-07 09:59:14 +0200 |
| commit | 4464bbba15d50ed32beb5995c13d26791ca61fe4 (patch) | |
| tree | 6b5e2800c14b62db83ad3c1f723074b2153a1c14 /tests | |
| parent | 2c57809a560cb67c79b9e8a77cc713e8a2424c8e (diff) | |
Fixed #14502 -- Added a verbatim template tag.
Thanks SmileyChris for the patch.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/templates/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py index 8590dd25af..957ad2b9ba 100644 --- a/tests/regressiontests/templates/tests.py +++ b/tests/regressiontests/templates/tests.py @@ -1616,6 +1616,14 @@ class Templates(unittest.TestCase): 'static-prefixtag04': ('{% load static %}{% get_media_prefix as media_prefix %}{{ media_prefix }}', {}, settings.MEDIA_URL), 'static-statictag01': ('{% load static %}{% static "admin/base.css" %}', {}, urljoin(settings.STATIC_URL, 'admin/base.css')), 'static-statictag02': ('{% load static %}{% static base_css %}', {'base_css': 'admin/base.css'}, urljoin(settings.STATIC_URL, 'admin/base.css')), + + # Verbatim template tag outputs contents without rendering. + 'verbatim-tag01': ('{% verbatim %}{{bare }}{% endverbatim %}', {}, '{{bare }}'), + 'verbatim-tag02': ('{% verbatim %}{% endif %}{% endverbatim %}', {}, '{% endif %}'), + 'verbatim-tag03': ("{% verbatim %}It's the {% verbatim %} tag{% endverbatim %}", {}, "It's the {% verbatim %} tag"), + 'verbatim-tag04': ('{% verbatim %}{% verbatim %}{% endverbatim %}{% endverbatim %}', {}, template.TemplateSyntaxError), + 'verbatim-tag05': ('{% verbatim %}{% endverbatim %}{% verbatim %}{% endverbatim %}', {}, ''), + 'verbatim-tag06': ("{% verbatim -- %}Don't {% endverbatim %} just yet{% -- %}", {}, "Don't {% endverbatim %} just yet"), } return tests |
