From 4568c40ae4bd51258290a4b0da169b3d5bce9ee7 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sat, 4 Feb 2017 21:38:59 +0100 Subject: Add test for == operator --- testing/tests/comparison.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 testing/tests/comparison.rs (limited to 'testing/tests') diff --git a/testing/tests/comparison.rs b/testing/tests/comparison.rs new file mode 100644 index 0000000..2e34bc0 --- /dev/null +++ b/testing/tests/comparison.rs @@ -0,0 +1,19 @@ +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"); +} -- cgit