diff options
Diffstat (limited to '')
-rw-r--r-- | testing/tests/macro.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs index 72f578e..25d95d8 100644 --- a/testing/tests/macro.rs +++ b/testing/tests/macro.rs @@ -14,3 +14,15 @@ fn test_macro() { let t = MacroTemplate { s: "foo" }; assert_eq!(t.render().unwrap(), "foo foo foo"); } + +#[derive(Template)] +#[template(path = "import.html")] +struct ImportTemplate<'a> { + s: &'a str, +} + +#[test] +fn test_import() { + let t = ImportTemplate { s: "foo" }; + assert_eq!(t.render().unwrap(), "foo foo foo"); +} |