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