diff options
Diffstat (limited to '')
-rw-r--r-- | testing/tests/simple.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index fd30499..bee5690 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -184,3 +184,14 @@ fn test_path_compare() { let t = PathCompareTemplate { x: Alphabet::Alpha }; assert_eq!(t.render().unwrap(), "true"); } + + +#[derive(Template)] +#[template(source = "{% for i in [1, 2] %}{{ i }}{% endfor %}", ext = "txt")] +struct ArrayTemplate {} + +#[test] +fn test_slice_literal() { + let t = ArrayTemplate {}; + assert_eq!(t.render().unwrap(), "12"); +} |