aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/ui/match_with_extra.rs
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests/ui/match_with_extra.rs')
-rw-r--r--testing/tests/ui/match_with_extra.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/tests/ui/match_with_extra.rs b/testing/tests/ui/match_with_extra.rs
new file mode 100644
index 0000000..528441e
--- /dev/null
+++ b/testing/tests/ui/match_with_extra.rs
@@ -0,0 +1,20 @@
+use askama::Template;
+
+#[derive(Template)]
+#[template(
+ ext = "txt",
+ source = r#"
+{%- match good -%}
+ // Help, I forgot how to write comments!
+ {%- when true %}
+ good
+ {%- when _ -%}
+ bad
+{%- endmatch -%}"#
+)]
+struct MatchWithExtra {
+ good: bool,
+}
+
+fn main() {
+}