From 6d1cf5e43dbf5d26506585db1f801064051f49a4 Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Fri, 30 Jul 2021 17:36:29 +0200 Subject: Issue #379 was fixed This PR adds the tests by @msrd0 that failed before. The error was fixed somewhen between f23162a and now, so these tests serve to prevent regressions in the future. I simplified the tests very slightly to omit whitespaces in the output. --- testing/tests/macro.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testing/tests/macro.rs') diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs index 7f7e4dc..e449dd5 100644 --- a/testing/tests/macro.rs +++ b/testing/tests/macro.rs @@ -63,3 +63,13 @@ fn test_nested_macro_with_args() { let t = NestedMacroArgsTemplate {}; assert_eq!(t.render().unwrap(), "first second"); } + +#[derive(Template)] +#[template(path = "macro-import-str-cmp.html")] +struct StrCmpTemplate; + +#[test] +fn str_cmp() { + let t = StrCmpTemplate; + assert_eq!(t.render().unwrap(), "AfooBotherCneitherD"); +} -- cgit