mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-02 15:25:19 +00:00
20 lines
307 B
Rust
20 lines
307 B
Rust
extern crate askama;
|
|
#[macro_use]
|
|
extern crate askama_derive;
|
|
|
|
use askama::Template;
|
|
|
|
#[derive(Template)]
|
|
#[template(path = "eq.html")]
|
|
struct EqTemplate {
|
|
a: usize,
|
|
b: usize,
|
|
c: usize,
|
|
}
|
|
|
|
#[test]
|
|
fn test_eq() {
|
|
let t = EqTemplate { a: 1, b: 1, c: 2 };
|
|
assert_eq!(t.render(), "tf\n");
|
|
}
|