askama/testing/tests/rust_macro.rs
2018-12-08 21:43:20 +01:00

18 lines
296 B
Rust

use askama::Template;
macro_rules! hello {
() => {
"world"
};
}
#[derive(Template)]
#[template(path = "rust-macros.html")]
struct RustMacrosTemplate {}
#[test]
fn main() {
let template = RustMacrosTemplate {};
assert_eq!("Hello, world!", template.render().unwrap());
}