diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-08-04 15:58:09 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-08-04 15:58:09 +0200 |
commit | e293a1a90c10f33f1fb147cc2fc4023ad43335f6 (patch) | |
tree | c509f0df76851daa792946ba68f7baf9a4f907f9 /askama_derive | |
parent | a90b065f46e209f4adb94139c948c8a1bdfaffdf (diff) | |
download | askama-e293a1a90c10f33f1fb147cc2fc4023ad43335f6.tar.gz askama-e293a1a90c10f33f1fb147cc2fc4023ad43335f6.tar.bz2 askama-e293a1a90c10f33f1fb147cc2fc4023ad43335f6.zip |
Add test for panic on invalid blocks (see #27)
Diffstat (limited to '')
-rw-r--r-- | askama_derive/src/parser.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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\" %}"); + } } |