blob: f474c55d4d164b8f8fca0a98d693c1142fe990f3 (
plain) (
tree)
|
|
#[macro_use]
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(), "INCLUDED: fooINCLUDED: bar")
}
|