aboutsummaryrefslogblamecommitdiffstats
path: root/testing/tests/rust_macro.rs
blob: a9924dbac0950f4023f4f741cd38d74cb7fec2ef (plain) (tree)
1
2
3
4
5
6
7





                     
           





                                      
                            


           
                                         

                                                            
#[macro_use]
extern crate askama;

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());
}