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


                     
           
               
      



                                      
                            


           
                                         

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