aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/templates/import.html6
-rw-r--r--testing/templates/macro.html16
-rw-r--r--testing/tests/macro.rs2
3 files changed, 17 insertions, 7 deletions
diff --git a/testing/templates/import.html b/testing/templates/import.html
index 87d7969..51ddd2f 100644
--- a/testing/templates/import.html
+++ b/testing/templates/import.html
@@ -1,2 +1,4 @@
-{% import "macro.html" -%}
-{%- call thrice(s) %}
+
+{%- import "macro.html" -%}
+
+{% call thrice(s) %}
diff --git a/testing/templates/macro.html b/testing/templates/macro.html
index d3ab77a..30ea742 100644
--- a/testing/templates/macro.html
+++ b/testing/templates/macro.html
@@ -1,5 +1,13 @@
-{% macro thrice(param) -%}
- {{ param }} {{ param }} {{ param }}
-{%- endmacro %}
+1
-{%- call thrice(s) %}
+{%- macro thrice(param) -%}
+
+{{ param }} {{ param }} {{ param }}
+
+{%- endmacro -%}
+
+2
+
+{%- call thrice(s) -%}
+
+3
diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs
index 25d95d8..fb54f88 100644
--- a/testing/tests/macro.rs
+++ b/testing/tests/macro.rs
@@ -12,7 +12,7 @@ struct MacroTemplate<'a> {
#[test]
fn test_macro() {
let t = MacroTemplate { s: "foo" };
- assert_eq!(t.render().unwrap(), "foo foo foo");
+ assert_eq!(t.render().unwrap(), "12foo foo foo3");
}
#[derive(Template)]