blob: 4776729f06e8f67b5d7db702c4d261e9c207859b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#[macro_use]
extern crate askama;
use askama::Template;
#[derive(Template)]
#[template(path = "for.html")]
struct ForTemplate<'a> {
strings: Vec<&'a str>,
}
#[test]
fn test_for() {
let s = ForTemplate {
strings: vec!["A", "alfa", "1"],
};
assert_eq!(s.render(), "0. A\n1. alfa\n2. 1\n");
}
|