aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/tests/loops.rs18
-rw-r--r--testing/tests/simple.rs15
2 files changed, 18 insertions, 15 deletions
diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs
new file mode 100644
index 0000000..4776729
--- /dev/null
+++ b/testing/tests/loops.rs
@@ -0,0 +1,18 @@
+#[macro_use]
+extern crate askama;
+
+use askama::Template;
+
+#[derive(Template)]
+#[template(path = "for.html")]
+struct ForTemplate<'a> {
+ strings: Vec<&'a str>,
+}
+
+#[test]
+fn test_for() {
+ let s = ForTemplate {
+ strings: vec!["A", "alfa", "1"],
+ };
+ assert_eq!(s.render(), "0. A\n1. alfa\n2. 1\n");
+}
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index a53257d..45bc0ff 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -66,21 +66,6 @@ fn test_else_if() {
#[derive(Template)]
-#[template(path = "for.html")]
-struct ForTemplate<'a> {
- strings: Vec<&'a str>,
-}
-
-#[test]
-fn test_for() {
- let s = ForTemplate {
- strings: vec!["A", "alfa", "1"],
- };
- assert_eq!(s.render(), "0. A\n1. alfa\n2. 1\n");
-}
-
-
-#[derive(Template)]
#[template(path = "literals.html")]
struct LiteralsTemplate {}