summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/template_tests/relative_templates/dir1/dir2/inc3.html1
-rw-r--r--tests/template_tests/test_extends_relative.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/template_tests/relative_templates/dir1/dir2/inc3.html b/tests/template_tests/relative_templates/dir1/dir2/inc3.html
new file mode 100644
index 0000000000..7a8374df51
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/dir2/inc3.html
@@ -0,0 +1 @@
+{% include tmpl %}
diff --git a/tests/template_tests/test_extends_relative.py b/tests/template_tests/test_extends_relative.py
index 12324f0df6..f797ae1a1a 100644
--- a/tests/template_tests/test_extends_relative.py
+++ b/tests/template_tests/test_extends_relative.py
@@ -64,6 +64,12 @@ class IncludeRelativeBehaviorTests(SimpleTestCase):
output = template.render(Context({}))
self.assertEqual(output.strip(), 'dir2 include')
+ def test_normal_include_variable(self):
+ engine = Engine(dirs=[RELATIVE])
+ template = engine.get_template('dir1/dir2/inc3.html')
+ output = template.render(Context({'tmpl': './include_content.html'}))
+ self.assertEqual(output.strip(), 'dir2 include')
+
def test_dir2_include(self):
engine = Engine(dirs=[RELATIVE])
template = engine.get_template('dir1/dir2/inc1.html')