diff options
Diffstat (limited to '')
-rw-r--r-- | testing/tests/simple.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index f532eaa..afd82e9 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -220,3 +220,16 @@ fn test_negation() { let t = NegationTemplate { foo: false }; assert_eq!(t.render().unwrap(), "Hello"); } + + +#[derive(Template)] +#[template(source = "{% if foo > -2 %}Hello{% endif %}", ext = "txt")] +struct MinusTemplate { + foo: i8, +} + +#[test] +fn test_minus() { + let t = MinusTemplate { foo: 1 }; + assert_eq!(t.render().unwrap(), "Hello"); +} |