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




                     
           
               
      



                                      
                            


           
                                         

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