askama/testing/tests/macro.rs
2017-08-23 12:43:53 +02:00

17 lines
277 B
Rust

#[macro_use]
extern crate askama;
use askama::Template;
#[derive(Template)]
#[template(path = "macro.html")]
struct MacroTemplate<'a> {
s: &'a str,
}
#[test]
fn test_macro() {
let t = MacroTemplate { s: "foo" };
assert_eq!(t.render().unwrap(), "foo foo foo");
}