aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/operators.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-09-04 20:31:28 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-09-04 20:31:28 +0200
commit32a9dd5f2edf3cd288a25d11479ca32336ba4a30 (patch)
tree908e2562c7cbe4feea29234703b6e2e36a124061 /testing/tests/operators.rs
parent6145cb5a4878b711b075da3759c2c60307fb43b2 (diff)
downloadaskama-32a9dd5f2edf3cd288a25d11479ca32336ba4a30.tar.gz
askama-32a9dd5f2edf3cd288a25d11479ca32336ba4a30.tar.bz2
askama-32a9dd5f2edf3cd288a25d11479ca32336ba4a30.zip
Moved precedence test into operators module
Diffstat (limited to 'testing/tests/operators.rs')
-rw-r--r--testing/tests/operators.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/tests/operators.rs b/testing/tests/operators.rs
index c58f650..625ec29 100644
--- a/testing/tests/operators.rs
+++ b/testing/tests/operators.rs
@@ -31,3 +31,14 @@ fn test_operators() {
let t = OperatorsTemplate { a: 1, b: 1, c: 2 };
assert_eq!(t.render().unwrap(), "muldivmodaddrshlshbandbxorborandor");
}
+
+
+#[derive(Template)]
+#[template(path = "precedence.html")]
+struct PrecedenceTemplate { }
+
+#[test]
+fn test_precedence() {
+ let t = PrecedenceTemplate { };
+ assert_eq!(t.render().unwrap(), "6".repeat(7));
+}