From e293a1a90c10f33f1fb147cc2fc4023ad43335f6 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 4 Aug 2017 15:58:09 +0200 Subject: Add test for panic on invalid blocks (see #27) --- askama_derive/src/parser.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'askama_derive/src') diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs index 8b5ec4e..d466379 100644 --- a/askama_derive/src/parser.rs +++ b/askama_derive/src/parser.rs @@ -398,4 +398,9 @@ mod tests { check_ws_split("b\n", &("", "b", "\n")); check_ws_split(" \t\r\n", &(" \t\r\n", "", "")); } + #[test] + #[should_panic] + fn test_invalid_block() { + super::parse("{% extend \"blah\" %}"); + } } -- cgit