aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-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 4ed1261..c9c3c0c 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -196,3 +196,14 @@ fn test_slice_literal() {
let t = ArrayTemplate {};
assert_eq!(t.render().unwrap(), "a");
}
+
+
+#[derive(Template)]
+#[template(source = " {# foo -#} ", ext = "txt")]
+struct CommentTemplate {}
+
+#[test]
+fn test_comment() {
+ let t = CommentTemplate {};
+ assert_eq!(t.render().unwrap(), " ");
+}