aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/tests/macro.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs
index 0088f36..9b3c63d 100644
--- a/testing/tests/macro.rs
+++ b/testing/tests/macro.rs
@@ -123,3 +123,20 @@ fn test_named_argument() {
"
);
}
+
+#[derive(Template)]
+#[template(
+ source = r#"{% macro button(label) %}
+{{- label -}}
+{% endmacro %}
+
+{%- call button(label="hi") -%}
+"#,
+ ext = "html"
+)]
+struct OnlyNamedArgument;
+
+#[test]
+fn test_only_named_argument() {
+ assert_eq!(OnlyNamedArgument.render().unwrap(), "hi");
+}