summaryrefslogtreecommitdiff
path: root/tests/template_tests/relative_templates
diff options
context:
space:
mode:
authorVitaly Bogomolov <mail@vitaly-bogomolov.ru>2016-03-24 11:39:37 +0300
committerTim Graham <timograham@gmail.com>2016-05-07 16:21:57 -0400
commitaec4f97555cbfc9d14d698f61d43a478f5911661 (patch)
tree9c866ff43cae89b657699968dc47d1552f1a9d61 /tests/template_tests/relative_templates
parentad403ffa45db3becc2fec727212538446b40d380 (diff)
Fixed #26402 -- Added relative path support in include/extends template tags.
Diffstat (limited to 'tests/template_tests/relative_templates')
-rw-r--r--tests/template_tests/relative_templates/dir1/dir2/inc1.html1
-rw-r--r--tests/template_tests/relative_templates/dir1/dir2/inc2.html1
-rw-r--r--tests/template_tests/relative_templates/dir1/dir2/include_content.html1
-rw-r--r--tests/template_tests/relative_templates/dir1/dir2/one.html3
-rw-r--r--tests/template_tests/relative_templates/dir1/looped.html3
-rw-r--r--tests/template_tests/relative_templates/dir1/one.html3
-rw-r--r--tests/template_tests/relative_templates/dir1/one1.html3
-rw-r--r--tests/template_tests/relative_templates/dir1/one2.html3
-rw-r--r--tests/template_tests/relative_templates/dir1/one3.html3
-rw-r--r--tests/template_tests/relative_templates/dir1/three.html3
-rw-r--r--tests/template_tests/relative_templates/dir1/two.html3
-rw-r--r--tests/template_tests/relative_templates/error_extends.html3
-rw-r--r--tests/template_tests/relative_templates/error_include.html1
-rw-r--r--tests/template_tests/relative_templates/one.html3
-rw-r--r--tests/template_tests/relative_templates/three.html1
-rw-r--r--tests/template_tests/relative_templates/two.html3
16 files changed, 38 insertions, 0 deletions
diff --git a/tests/template_tests/relative_templates/dir1/dir2/inc1.html b/tests/template_tests/relative_templates/dir1/dir2/inc1.html
new file mode 100644
index 0000000000..a854bef662
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/dir2/inc1.html
@@ -0,0 +1 @@
+{% include "./../../three.html" %}
diff --git a/tests/template_tests/relative_templates/dir1/dir2/inc2.html b/tests/template_tests/relative_templates/dir1/dir2/inc2.html
new file mode 100644
index 0000000000..376f47975e
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/dir2/inc2.html
@@ -0,0 +1 @@
+{% include "./include_content.html" %}
diff --git a/tests/template_tests/relative_templates/dir1/dir2/include_content.html b/tests/template_tests/relative_templates/dir1/dir2/include_content.html
new file mode 100644
index 0000000000..132d8b8145
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/dir2/include_content.html
@@ -0,0 +1 @@
+dir2 include
diff --git a/tests/template_tests/relative_templates/dir1/dir2/one.html b/tests/template_tests/relative_templates/dir1/dir2/one.html
new file mode 100644
index 0000000000..11e6424213
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/dir2/one.html
@@ -0,0 +1,3 @@
+{% extends "./../../one.html" %}
+
+{% block content %}{{ block.super }} dir2 one{% endblock %}
diff --git a/tests/template_tests/relative_templates/dir1/looped.html b/tests/template_tests/relative_templates/dir1/looped.html
new file mode 100644
index 0000000000..8e9d8ac4e5
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/looped.html
@@ -0,0 +1,3 @@
+{% extends "./dir2/../looped.html" %}
+
+{% block content %}{{ block.super }} dir1 three{% endblock %}
diff --git a/tests/template_tests/relative_templates/dir1/one.html b/tests/template_tests/relative_templates/dir1/one.html
new file mode 100644
index 0000000000..3b89c23330
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/one.html
@@ -0,0 +1,3 @@
+{% extends "./../one.html" %}
+
+{% block content %}{{ block.super }} dir1 one{% endblock %}
diff --git a/tests/template_tests/relative_templates/dir1/one1.html b/tests/template_tests/relative_templates/dir1/one1.html
new file mode 100644
index 0000000000..9f60109975
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/one1.html
@@ -0,0 +1,3 @@
+{% extends './../one.html' %}
+
+{% block content %}{{ block.super }} dir1 one{% endblock %}
diff --git a/tests/template_tests/relative_templates/dir1/one2.html b/tests/template_tests/relative_templates/dir1/one2.html
new file mode 100644
index 0000000000..1ca9f17b21
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/one2.html
@@ -0,0 +1,3 @@
+{% extends '../one.html' %}
+
+{% block content %}{{ block.super }} dir1 one{% endblock %}
diff --git a/tests/template_tests/relative_templates/dir1/one3.html b/tests/template_tests/relative_templates/dir1/one3.html
new file mode 100644
index 0000000000..3df6195fbb
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/one3.html
@@ -0,0 +1,3 @@
+{% extends "../one.html" %}
+
+{% block content %}{{ block.super }} dir1 one{% endblock %}
diff --git a/tests/template_tests/relative_templates/dir1/three.html b/tests/template_tests/relative_templates/dir1/three.html
new file mode 100644
index 0000000000..d8e3c3cb74
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/three.html
@@ -0,0 +1,3 @@
+{% extends "./dir2/../../three.html" %}
+
+{% block content %}{{ block.super }} dir1 three{% endblock %}
diff --git a/tests/template_tests/relative_templates/dir1/two.html b/tests/template_tests/relative_templates/dir1/two.html
new file mode 100644
index 0000000000..b6542b8a3e
--- /dev/null
+++ b/tests/template_tests/relative_templates/dir1/two.html
@@ -0,0 +1,3 @@
+{% extends "./dir2/one.html" %}
+
+{% block content %}{{ block.super }} dir1 two{% endblock %}
diff --git a/tests/template_tests/relative_templates/error_extends.html b/tests/template_tests/relative_templates/error_extends.html
new file mode 100644
index 0000000000..83e41b2999
--- /dev/null
+++ b/tests/template_tests/relative_templates/error_extends.html
@@ -0,0 +1,3 @@
+{% extends "./../two.html" %}
+
+{% block content %}{{ block.super }} one{% endblock %}
diff --git a/tests/template_tests/relative_templates/error_include.html b/tests/template_tests/relative_templates/error_include.html
new file mode 100644
index 0000000000..a5efe30fbc
--- /dev/null
+++ b/tests/template_tests/relative_templates/error_include.html
@@ -0,0 +1 @@
+{% include "./../three.html" %}
diff --git a/tests/template_tests/relative_templates/one.html b/tests/template_tests/relative_templates/one.html
new file mode 100644
index 0000000000..9ced0ff8e4
--- /dev/null
+++ b/tests/template_tests/relative_templates/one.html
@@ -0,0 +1,3 @@
+{% extends "./two.html" %}
+
+{% block content %}{{ block.super }} one{% endblock %}
diff --git a/tests/template_tests/relative_templates/three.html b/tests/template_tests/relative_templates/three.html
new file mode 100644
index 0000000000..360aeeea5e
--- /dev/null
+++ b/tests/template_tests/relative_templates/three.html
@@ -0,0 +1 @@
+{% block content %}three{% endblock %}
diff --git a/tests/template_tests/relative_templates/two.html b/tests/template_tests/relative_templates/two.html
new file mode 100644
index 0000000000..5fb317db93
--- /dev/null
+++ b/tests/template_tests/relative_templates/two.html
@@ -0,0 +1,3 @@
+{% extends "./three.html" %}
+
+{% block content %}{{ block.super }} two{% endblock %}