diff --git a/tests/template_tests/relative_templates/one_var.html b/tests/template_tests/relative_templates/one_var.html new file mode 100644 index 00000000000..1d040e1fe88 --- /dev/null +++ b/tests/template_tests/relative_templates/one_var.html @@ -0,0 +1,3 @@ +{% extends tmpl %} + +{% block content %}{{ block.super }} one{% endblock %} diff --git a/tests/template_tests/test_extends_relative.py b/tests/template_tests/test_extends_relative.py index 12324f0df6c..9e8d7fc9b95 100644 --- a/tests/template_tests/test_extends_relative.py +++ b/tests/template_tests/test_extends_relative.py @@ -16,6 +16,12 @@ class ExtendsRelativeBehaviorTests(SimpleTestCase): output = template.render(Context({})) self.assertEqual(output.strip(), 'three two one') + def test_normal_extend_variable(self): + engine = Engine(dirs=[RELATIVE]) + template = engine.get_template('one_var.html') + output = template.render(Context({'tmpl': './two.html'})) + self.assertEqual(output.strip(), 'three two one') + def test_dir1_extend(self): engine = Engine(dirs=[RELATIVE]) template = engine.get_template('dir1/one.html')