Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added anothe test

--HG--
branch : trunk
  • Loading branch information...
commit 3ca776188bb7396d54159a321729ea1d3ac4f9b2 1 parent 4cccc22
@mitsuhiko authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 jinja2/testsuite/ext.py
View
5 jinja2/testsuite/ext.py
@@ -56,7 +56,8 @@
'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 @@ def test_novars_vars_escaping(self):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.