aboutsummaryrefslogtreecommitdiffstats
path: root/testing
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
commitee9db1dbf441b0fd17058b56d39a27abf9d3e517 (patch)
tree4c1a5b7754a4bd85ad231e74ad0686039f7cedc6 /testing
parent5503b945cc9ec274ae3d859330767e1088b13a52 (diff)
downloadaskama-ee9db1dbf441b0fd17058b56d39a27abf9d3e517.tar.gz
askama-ee9db1dbf441b0fd17058b56d39a27abf9d3e517.tar.bz2
askama-ee9db1dbf441b0fd17058b56d39a27abf9d3e517.zip
Make ext attribute mandatory for source-specified templates
Diffstat (limited to '')
-rw-r--r--testing/tests/filters.rs2
-rw-r--r--testing/tests/simple.rs6
-rw-r--r--testing/tests/vars.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/testing/tests/filters.rs b/testing/tests/filters.rs
index b24ff61..39fe0ff 100644
--- a/testing/tests/filters.rs
+++ b/testing/tests/filters.rs
@@ -33,7 +33,7 @@ fn filter_format() {
#[derive(Template)]
-#[template(source = "{{ s|myfilter }}")]
+#[template(source = "{{ s|myfilter }}", ext = "txt")]
struct MyFilterTemplate<'a> {
s: &'a str,
}
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index 57887c8..8fd61d2 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -184,7 +184,7 @@ fn test_composition() {
#[derive(Template)]
-#[template(source = "{{ foo }}")]
+#[template(source = "{{ foo }}", ext = "html")]
struct ImplicitEscapedTemplate<'a> {
foo: &'a str,
}
@@ -197,7 +197,7 @@ fn test_implicit_escaped() {
#[derive(Template)]
-#[template(source = "{{ foo }}", escape = "html")]
+#[template(source = "{{ foo }}", ext = "html", escape = "html")]
struct ExplicitEscapedTemplate<'a> {
foo: &'a str,
}
@@ -210,7 +210,7 @@ fn test_explicit_escaped() {
#[derive(Template)]
-#[template(source = "{{ foo }}", escape = "none")]
+#[template(source = "{{ foo }}", ext = "txt")]
struct UnescapedTemplate<'a> {
foo: &'a str,
}
diff --git a/testing/tests/vars.rs b/testing/tests/vars.rs
index db99a61..39a1415 100644
--- a/testing/tests/vars.rs
+++ b/testing/tests/vars.rs
@@ -4,7 +4,7 @@ extern crate askama;
use askama::Template;
#[derive(Template)]
-#[template(source = "{% let v = s %}{{ v }}")]
+#[template(source = "{% let v = s %}{{ v }}", ext = "txt")]
struct LetTemplate<'a> {
s: &'a str,
}