From dabe982ab6ae2ecf2c225852df16bb70614f2a49 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 5 Feb 2017 08:26:13 +0100 Subject: Add test for string literals --- testing/tests/simple.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'testing/tests/simple.rs') diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index 63203e7..2aa93ea 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -79,3 +79,14 @@ fn test_for() { }; assert_eq!(s.render(), "\n A\n\n alfa\n\n 1\n\n"); } + + +#[derive(Template)] +#[template(path = "literals.html")] +struct LiteralsTemplate {} + +#[test] +fn test_literals() { + let s = LiteralsTemplate {}; + assert_eq!(s.render(), "a\n"); +} -- cgit