projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a3d93b
)
Added a testcase for add_extension
author
Armin Ronacher
<armin.ronacher@active-4.com>
Sat, 29 May 2010 20:03:29 +0000
(22:03 +0200)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Sat, 29 May 2010 20:03:29 +0000
(22:03 +0200)
--HG--
branch : trunk
jinja2/testsuite/ext.py
patch
|
blob
|
history
diff --git
a/jinja2/testsuite/ext.py
b/jinja2/testsuite/ext.py
index 98e4161a80e59c94305125b9c3c6875c1d95a676..f97853d12a41f10393fc04ac9f30d7533c27cbca 100644
(file)
--- a/
jinja2/testsuite/ext.py
+++ b/
jinja2/testsuite/ext.py
@@
-158,6
+158,12
@@
class StreamFilterExtension(Extension):
class ExtensionsTestCase(JinjaTestCase):
+ def test_extend_late(self):
+ env = Environment()
+ env.add_extension('jinja2.ext.autoescape')
+ t = env.from_string('{% autoescape true %}{{ "<test>" }}{% endautoescape %}')
+ assert t.render() == '<test>'
+
def test_loop_controls(self):
env = Environment(extensions=['jinja2.ext.loopcontrols'])