aboutsummaryrefslogblamecommitdiffstats
path: root/testing/tests/macro.rs
blob: 320ca2c1d9837cb7391d0e29e4c9c2aa4add5817 (plain) (tree)
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", 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");
}