aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/simple.rs
diff options
context:
space:
mode:
authorLibravatar René Kijewski <kijewski@library.vetmed.fu-berlin.de>2021-10-12 19:24:40 +0200
committerLibravatar René Kijewski <kijewski@library.vetmed.fu-berlin.de>2021-11-29 23:53:27 +0100
commitef3e840ac4874e52aa52da6ed5f0afddafa61d1a (patch)
tree2074c13e9c0b978fe1538ec81e88e1957a9a1b96 /testing/tests/simple.rs
parent4940b5dd5e792811491f1c3c3b1c70c8177c7e02 (diff)
downloadaskama-ef3e840ac4874e52aa52da6ed5f0afddafa61d1a.tar.gz
askama-ef3e840ac4874e52aa52da6ed5f0afddafa61d1a.tar.bz2
askama-ef3e840ac4874e52aa52da6ed5f0afddafa61d1a.zip
Allow whitespace trimming in {{raw}} blocks
Diffstat (limited to 'testing/tests/simple.rs')
-rw-r--r--testing/tests/simple.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index c712900..e66485a 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -433,6 +433,16 @@ fn test_raw_complex() {
);
}
+#[derive(Template)]
+#[template(path = "raw-ws.html")]
+struct RawTemplateWs;
+
+#[test]
+fn test_raw_ws() {
+ let template = RawTemplateWs;
+ assert_eq!(template.render().unwrap(), "<{{hello}}>\n<{{bye}}>");
+}
+
mod without_import_on_derive {
#[derive(askama::Template)]
#[template(source = "foo", ext = "txt")]