aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/templates/deep-import-child.html4
-rw-r--r--testing/templates/deep-import-parent.html2
-rw-r--r--testing/templates/deep-nested-macro.html4
-rw-r--r--testing/tests/macro.rs10
4 files changed, 18 insertions, 2 deletions
diff --git a/testing/templates/deep-import-child.html b/testing/templates/deep-import-child.html
new file mode 100644
index 0000000..268d6d0
--- /dev/null
+++ b/testing/templates/deep-import-child.html
@@ -0,0 +1,4 @@
+{%- import "nested-macro.html" as libi -%}
+{%- macro parent() -%}
+ {% call libi::parent() %}
+{%- endmacro -%}
diff --git a/testing/templates/deep-import-parent.html b/testing/templates/deep-import-parent.html
new file mode 100644
index 0000000..6aa6009
--- /dev/null
+++ b/testing/templates/deep-import-parent.html
@@ -0,0 +1,2 @@
+{%- import "deep-import-child.html" as libj -%}
+{% call libj::parent() %}
diff --git a/testing/templates/deep-nested-macro.html b/testing/templates/deep-nested-macro.html
index 39e8e91..c34dd5f 100644
--- a/testing/templates/deep-nested-macro.html
+++ b/testing/templates/deep-nested-macro.html
@@ -1,2 +1,2 @@
-{%- import "nested-macro.html" as libk -%}
-{%- call libk::parent() -%}
+{%- import "nested-macro.html" as libi -%}
+{%- call libi::parent() -%}
diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs
index 4e43d7c..77e0e59 100644
--- a/testing/tests/macro.rs
+++ b/testing/tests/macro.rs
@@ -36,3 +36,13 @@ fn test_nested() {
let t = NestedTemplate;
assert_eq!(t.render().unwrap(), "foo");
}
+
+#[derive(Template)]
+#[template(path = "deep-import-parent.html")]
+struct DeepImportTemplate;
+
+#[test]
+fn test_deep_import() {
+ let t = DeepImportTemplate;
+ assert_eq!(t.render().unwrap(), "foo");
+}