From a7f5186bf49ef20010c2eae7717b3a738a3b548e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 23 Oct 2023 13:32:37 +0200 Subject: Add test specifically for named blocks, and named macros --- testing/tests/inheritance.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'testing/tests/inheritance.rs') diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index 5d8aefb..906be04 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -340,3 +340,15 @@ fn test_let_block() { let t = LetChild {}; assert_eq!(t.render().unwrap(), "1"); } + +#[derive(Template)] +#[template(path = "named-end.html")] +struct NamedBlocks<'a> { + title: &'a str, +} + +#[test] +fn test_named_end() { + let n = NamedBlocks { title: "title" }; + assert_eq!(n.render().unwrap(), "title\n\ntadam\nCopyright 2017"); +} -- cgit