aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests
diff options
context:
space:
mode:
authorLibravatar bott <mhpoin@gmail.com>2018-09-01 20:19:15 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-09-02 16:01:20 +0200
commitf29c12f469ccb76ed06aff6d6dc037dfd7dd2406 (patch)
treed9b011860a988b8fa4a6f1853fd822dc99607843 /testing/tests
parent16b577e3070ca935180652e7ce24563bd396babc (diff)
downloadaskama-f29c12f469ccb76ed06aff6d6dc037dfd7dd2406.tar.gz
askama-f29c12f469ccb76ed06aff6d6dc037dfd7dd2406.tar.bz2
askama-f29c12f469ccb76ed06aff6d6dc037dfd7dd2406.zip
Add test for nested macro calls into different scope
Diffstat (limited to '')
-rw-r--r--testing/tests/macro.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs
index fb54f88..4e43d7c 100644
--- a/testing/tests/macro.rs
+++ b/testing/tests/macro.rs
@@ -26,3 +26,13 @@ fn test_import() {
let t = ImportTemplate { s: "foo" };
assert_eq!(t.render().unwrap(), "foo foo foo");
}
+
+#[derive(Template)]
+#[template(path = "deep-nested-macro.html")]
+struct NestedTemplate;
+
+#[test]
+fn test_nested() {
+ let t = NestedTemplate;
+ assert_eq!(t.render().unwrap(), "foo");
+}