From a4c78436661afc2c588db49fef11e962757a0b6b Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sat, 29 May 2010 22:03:29 +0200 Subject: [PATCH] Added a testcase for add_extension --HG-- branch : trunk --- jinja2/testsuite/ext.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jinja2/testsuite/ext.py b/jinja2/testsuite/ext.py index 98e4161..f97853d 100644 --- 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 %}{{ "" }}{% endautoescape %}') + assert t.render() == '<test>' + def test_loop_controls(self): env = Environment(extensions=['jinja2.ext.loopcontrols']) -- 2.26.2