diff options
author | vallentin <mail@vallentin.dev> | 2021-01-02 23:55:46 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2021-01-05 16:17:14 +0100 |
commit | f9db4446d5325b1cd6fa6154a7630e5138b61975 (patch) | |
tree | f6b425191e89b2ca508af6da1072722165d54612 /testing/tests | |
parent | b76f7ef778dd37db08cb4dba2dc9329b15bbe984 (diff) | |
download | askama-f9db4446d5325b1cd6fa6154a7630e5138b61975.tar.gz askama-f9db4446d5325b1cd6fa6154a7630e5138b61975.tar.bz2 askama-f9db4446d5325b1cd6fa6154a7630e5138b61975.zip |
Added copy literals related test case
Diffstat (limited to 'testing/tests')
-rw-r--r-- | testing/tests/loops.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs index 4345b4f..809f75e 100644 --- a/testing/tests/loops.rs +++ b/testing/tests/loops.rs @@ -93,6 +93,18 @@ fn test_for_method_call() { #[derive(Template)] #[template( + source = "{% for i in ::std::iter::repeat(\"a\").take(5) %}{{ i }}{% endfor %}", + ext = "txt" +)] +struct ForPathCallTemplate; + +#[test] +fn test_for_path_call() { + assert_eq!(ForPathCallTemplate.render().unwrap(), "aaaaa"); +} + +#[derive(Template)] +#[template( source = "{% for i in [1, 2, 3, 4, 5][3..] %}{{ i }}{% endfor %}", ext = "txt" )] |