blob: d2998a1a39921ab07f20d6d9c7e59fd1dd1b5e06 (
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")
}
|