From: Armin Ronacher Date: Tue, 6 Jul 2010 10:00:33 +0000 (+0200) Subject: Added anothe test X-Git-Tag: 2.5.1~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3ca776188bb7396d54159a321729ea1d3ac4f9b2;p=jinja2.git Added anothe test --HG-- branch : trunk --- diff --git a/jinja2/testsuite/ext.py b/jinja2/testsuite/ext.py index 530fed4..89b8579 100644 --- a/jinja2/testsuite/ext.py +++ b/jinja2/testsuite/ext.py @@ -56,7 +56,8 @@ newstyle_i18n_templates = { 'transvars2.html': '{% trans num=count %}User: {{ num }}{% endtrans %}', 'transvars3.html': '{% trans count=num %}User: {{ count }}{% endtrans %}', 'novars.html': '{% trans %}%(hello)s{% endtrans %}', - 'vars.html': '{% trans %}{{ foo }}%(foo)s{% endtrans %}' + 'vars.html': '{% trans %}{{ foo }}%(foo)s{% endtrans %}', + 'explicitvars.html': '{% trans foo="42" %}%(foo)s{% endtrans %}' } @@ -364,6 +365,8 @@ class NewstyleInternationalizationTestCase(JinjaTestCase): assert t.render() == '%(hello)s' t = newstyle_i18n_env.get_template('vars.html') assert t.render(foo='42') == '42%(foo)s' + t = newstyle_i18n_env.get_template('explicitvars.html') + assert t.render() == '%(foo)s' class AutoEscapeTestCase(JinjaTestCase):