aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/simple.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-09-07 20:42:54 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-09-07 20:42:54 +0200
commit07e9b307c88d33900f1843239582edc0ac546c4a (patch)
tree8dd46657ac4c155a773bf1a4aa12315a1a3eb9c3 /testing/tests/simple.rs
parent92d93e0e8b2098d3e07480e2a5b6fd43f6173985 (diff)
downloadaskama-07e9b307c88d33900f1843239582edc0ac546c4a.tar.gz
askama-07e9b307c88d33900f1843239582edc0ac546c4a.tar.bz2
askama-07e9b307c88d33900f1843239582edc0ac546c4a.zip
Move escaping tests into a separate module
Diffstat (limited to 'testing/tests/simple.rs')
-rw-r--r--testing/tests/simple.rs52
1 files changed, 0 insertions, 52 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index a05b956..93faf50 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -181,55 +181,3 @@ fn test_composition() {
let t = CompositionTemplate { foo: IfTemplate { cond: true } };
assert_eq!(t.render().unwrap(), "composed: true");
}
-
-
-#[derive(Template)]
-#[template(source = "{{ foo }}", ext = "html")]
-struct ImplicitEscapedTemplate<'a> {
- foo: &'a str,
-}
-
-#[test]
-fn test_implicit_escaped() {
- let t = ImplicitEscapedTemplate { foo: "foo & bar" };
- assert_eq!(t.render().unwrap(), "foo &amp; bar");
-}
-
-
-#[derive(Template)]
-#[template(source = "{{ foo }}", ext = "html", escape = "html")]
-struct ExplicitEscapedTemplate<'a> {
- foo: &'a str,
-}
-
-#[test]
-fn test_explicit_escaped() {
- let t = ExplicitEscapedTemplate { foo: "foo & bar" };
- assert_eq!(t.render().unwrap(), "foo &amp; bar");
-}
-
-
-#[derive(Template)]
-#[template(source = "{{ foo }}", ext = "txt")]
-struct UnescapedTemplate<'a> {
- foo: &'a str,
-}
-
-#[test]
-fn test_unescaped() {
- let t = UnescapedTemplate { foo: "foo & bar" };
- assert_eq!(t.render().unwrap(), "foo & bar");
-}
-
-
-#[derive(Template)]
-#[template(path = "hello.html")]
-struct PathBasedEscapedTemplate<'a> {
- name: &'a str,
-}
-
-#[test]
-fn test_path_based_escaped() {
- let t = PathBasedEscapedTemplate { name: "you & me" };
- assert_eq!(t.render().unwrap(), "Hello, you &amp; me!");
-}