aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/simple.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-05 08:26:13 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-05 08:26:13 +0100
commitdabe982ab6ae2ecf2c225852df16bb70614f2a49 (patch)
treea6e1b43929cd2af7b02ea7db81bc41aff236ce5d /testing/tests/simple.rs
parent11abb163ec62e5db9166086b8083e002b24aa906 (diff)
downloadaskama-dabe982ab6ae2ecf2c225852df16bb70614f2a49.tar.gz
askama-dabe982ab6ae2ecf2c225852df16bb70614f2a49.tar.bz2
askama-dabe982ab6ae2ecf2c225852df16bb70614f2a49.zip
Add test for string literals
Diffstat (limited to 'testing/tests/simple.rs')
-rw-r--r--testing/tests/simple.rs11
1 files changed, 11 insertions, 0 deletions
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");
+}