From 14beb21d0cef62ca47ad85617bd9460369a15b61 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 22 Oct 2017 14:26:38 +0200 Subject: Make empty string literals work --- testing/tests/simple.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testing/tests') diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index bee5690..37027b7 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -187,11 +187,11 @@ fn test_path_compare() { #[derive(Template)] -#[template(source = "{% for i in [1, 2] %}{{ i }}{% endfor %}", ext = "txt")] +#[template(source = "{% for i in [\"a\", \"\"] %}{{ i }}{% endfor %}", ext = "txt")] struct ArrayTemplate {} #[test] fn test_slice_literal() { let t = ArrayTemplate {}; - assert_eq!(t.render().unwrap(), "12"); + assert_eq!(t.render().unwrap(), "a"); } -- cgit