From 49252d2457f280026c020d0df46733578eb959a5 Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Mon, 21 Jun 2021 16:35:57 +1000 Subject: Fix code generation for macro calls that store args in variables. --- testing/tests/macro.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testing/tests') diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs index 459b1e2..7f7e4dc 100644 --- a/testing/tests/macro.rs +++ b/testing/tests/macro.rs @@ -53,3 +53,13 @@ fn test_short_circuit() { let t = ShortCircuitTemplate {}; assert_eq!(t.render().unwrap(), "truetruetruefalsetruetrue"); } + +#[derive(Template)] +#[template(path = "nested-macro-args.html")] +struct NestedMacroArgsTemplate {} + +#[test] +fn test_nested_macro_with_args() { + let t = NestedMacroArgsTemplate {}; + assert_eq!(t.render().unwrap(), "first second"); +} -- cgit