aboutsummaryrefslogblamecommitdiffstats
path: root/testing/tests/include.rs
blob: 8e6773b68dbcd11d5cca8725b52028de1590b154 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                  
                                            
                                                                         
 
extern crate askama;

use askama::Template;

#[derive(Template)]
#[template(path = "include.html")]
struct IncludeTemplate<'a> {
    strs: &'a [&'a str],
}

#[test]
fn test_include() {
    let strs = vec!["foo", "bar"];
    let s = IncludeTemplate { strs: &strs };
    assert_eq!(s.render().unwrap(), "\n  INCLUDED: foo\n  INCLUDED: bar")
}