diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-09-28 15:15:45 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-09-28 15:40:57 +0200 |
commit | 5ab8813fe29cfbc034b6f99fc36064dcd1a5bd3e (patch) | |
tree | f4b8d1b43520675eb4164ed7d29154530df4d4eb /askama_parser/src/tests.rs | |
parent | c8530493a1b6e773a4d2a16d01e7ed69ae160621 (diff) | |
download | askama-5ab8813fe29cfbc034b6f99fc36064dcd1a5bd3e.tar.gz askama-5ab8813fe29cfbc034b6f99fc36064dcd1a5bd3e.tar.bz2 askama-5ab8813fe29cfbc034b6f99fc36064dcd1a5bd3e.zip |
Yield a parser error when defining a macro named 'super'
Diffstat (limited to 'askama_parser/src/tests.rs')
-rw-r--r-- | askama_parser/src/tests.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/askama_parser/src/tests.rs b/askama_parser/src/tests.rs index c23d13f..3a7b452 100644 --- a/askama_parser/src/tests.rs +++ b/askama_parser/src/tests.rs @@ -795,3 +795,9 @@ fn fuzzed_unicode_slice() { 0!(!1q҄א!)!!!!!!n!"; assert!(Ast::from_str(d, &Syntax::default()).is_err()); } + +#[test] +fn fuzzed_macro_no_end() { + let s = "{%macro super%}{%endmacro"; + assert!(Ast::from_str(s, &Syntax::default()).is_err()); +} |