aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/templates/macro.html12
-rw-r--r--testing/tests/macro.rs2
2 files changed, 13 insertions, 1 deletions
diff --git a/testing/templates/macro.html b/testing/templates/macro.html
index 30ea742..f2f89e0 100644
--- a/testing/templates/macro.html
+++ b/testing/templates/macro.html
@@ -11,3 +11,15 @@
{%- call thrice(s) -%}
3
+
+{%- macro twice(param) -%}
+
+{{ param }} {{ param }}
+
+{%- endmacro twice -%}
+
+4
+
+{%- call twice(s) -%}
+
+5
diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs
index e449dd5..6b0eca5 100644
--- a/testing/tests/macro.rs
+++ b/testing/tests/macro.rs
@@ -9,7 +9,7 @@ struct MacroTemplate<'a> {
#[test]
fn test_macro() {
let t = MacroTemplate { s: "foo" };
- assert_eq!(t.render().unwrap(), "12foo foo foo3");
+ assert_eq!(t.render().unwrap(), "12foo foo foo34foo foo5");
}
#[derive(Template)]