aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template/templates
diff options
context:
space:
mode:
authorFyorl <gaelreth@gmail.com>2012-07-07 22:43:52 +0100
committerFyorl <gaelreth@gmail.com>2012-07-08 20:41:00 +0100
commitd5896239068e1063970f398a12ffb5a0707fb286 (patch)
tree2cecbff20e71e466412cadbb7f49c52044a0b244 /tests/template/templates
parent576cd6dd1e45171e998d6aa13ab74b73939ce084 (diff)
downloadforums-d5896239068e1063970f398a12ffb5a0707fb286.tar
forums-d5896239068e1063970f398a12ffb5a0707fb286.tar.gz
forums-d5896239068e1063970f398a12ffb5a0707fb286.tar.bz2
forums-d5896239068e1063970f398a12ffb5a0707fb286.tar.xz
forums-d5896239068e1063970f398a12ffb5a0707fb286.zip
[ticket/10970] Paths of the form {FOO}/a/{BAR}/b parsed correctly
A new method to handle this type of path was added and compile_tag_include, compile_tag_include_php and compile_tag_include_js were modified to use it appropriately. Tests were added for these three macros also. PHPBB3-10970
Diffstat (limited to 'tests/template/templates')
-rw-r--r--tests/template/templates/include_variables.html1
-rw-r--r--tests/template/templates/includejs.html4
-rw-r--r--tests/template/templates/includephp_variables.html2
-rw-r--r--tests/template/templates/subdir/parent_only.js0
-rw-r--r--tests/template/templates/subdir/subsubdir/parent_only.js0
-rw-r--r--tests/template/templates/subdir/variable.html1
6 files changed, 7 insertions, 1 deletions
diff --git a/tests/template/templates/include_variables.html b/tests/template/templates/include_variables.html
new file mode 100644
index 0000000000..8371a061b5
--- /dev/null
+++ b/tests/template/templates/include_variables.html
@@ -0,0 +1 @@
+<!-- INCLUDE {SUBDIR}/variable.html -->
diff --git a/tests/template/templates/includejs.html b/tests/template/templates/includejs.html
index 8a2587d76b..dbcf6e04a8 100644
--- a/tests/template/templates/includejs.html
+++ b/tests/template/templates/includejs.html
@@ -2,4 +2,6 @@
<!-- INCLUDEJS {PARENT} -->
<!-- DEFINE $TEST = 'child_only.js' -->
<!-- INCLUDEJS {$TEST} -->
-{SCRIPTS} \ No newline at end of file
+<!-- INCLUDEJS subdir/{PARENT} -->
+<!-- INCLUDEJS {SUBDIR}/subsubdir/{PARENT} -->
+{SCRIPTS}
diff --git a/tests/template/templates/includephp_variables.html b/tests/template/templates/includephp_variables.html
new file mode 100644
index 0000000000..6106efc86a
--- /dev/null
+++ b/tests/template/templates/includephp_variables.html
@@ -0,0 +1,2 @@
+Path includes variables.
+<!-- INCLUDEPHP ../tests/template/{TEMPLATES}/_dummy_include.php.inc -->
diff --git a/tests/template/templates/subdir/parent_only.js b/tests/template/templates/subdir/parent_only.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/template/templates/subdir/parent_only.js
diff --git a/tests/template/templates/subdir/subsubdir/parent_only.js b/tests/template/templates/subdir/subsubdir/parent_only.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/template/templates/subdir/subsubdir/parent_only.js
diff --git a/tests/template/templates/subdir/variable.html b/tests/template/templates/subdir/variable.html
new file mode 100644
index 0000000000..f68f91597c
--- /dev/null
+++ b/tests/template/templates/subdir/variable.html
@@ -0,0 +1 @@
+{VARIABLE}