diff options
author | Christian Vallentin <vallentinsource@gmail.com> | 2020-12-01 09:25:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 09:25:36 +0100 |
commit | f4065b09b91f5d00efa5644915cdd83bfb7d393a (patch) | |
tree | 8197d60f39068af657ce827120ea35ac467c7b0a /testing/tests/operators.rs | |
parent | 8603298dc8c8c80d95199e1f42ec6951264322f1 (diff) | |
download | askama-f4065b09b91f5d00efa5644915cdd83bfb7d393a.tar.gz askama-f4065b09b91f5d00efa5644915cdd83bfb7d393a.tar.bz2 askama-f4065b09b91f5d00efa5644915cdd83bfb7d393a.zip |
Fixed implicit borrow of expressions (#390)
Diffstat (limited to '')
-rw-r--r-- | testing/tests/operators.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/tests/operators.rs b/testing/tests/operators.rs index 99a2a4c..05c1dab 100644 --- a/testing/tests/operators.rs +++ b/testing/tests/operators.rs @@ -53,3 +53,13 @@ fn test_ranges() { }; assert_eq!(t.render().unwrap(), "abcd\nbcd\n\na\nab"); } + +#[derive(Template)] +#[template(source = "{{ true && true }}{{ false || true }}", ext = "txt")] +struct ShortCircuitTemplate {} + +#[test] +fn test_short_circuit() { + let t = ShortCircuitTemplate {}; + assert_eq!(t.render().unwrap(), "truetrue"); +} |