aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/tests/simple.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index d2111f0..fd30499 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -166,3 +166,21 @@ fn test_composition() {
let t = CompositionTemplate { foo: IfTemplate { cond: true } };
assert_eq!(t.render().unwrap(), "composed: true");
}
+
+
+#[derive(PartialEq, Eq)]
+enum Alphabet {
+ Alpha,
+}
+
+#[derive(Template)]
+#[template(source = "{% if x == Alphabet::Alpha %}true{% endif %}", ext = "txt")]
+struct PathCompareTemplate {
+ x: Alphabet,
+}
+
+#[test]
+fn test_path_compare() {
+ let t = PathCompareTemplate { x: Alphabet::Alpha };
+ assert_eq!(t.render().unwrap(), "true");
+}