blob: 72f578ea5d5dc96a1a7c8a433c5553886c08196b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#[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");
}
|