mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 21:41:35 +00:00
parser: add test for target recursion overflow
This commit is contained in:
parent
10c38c51f6
commit
84c2094e87
@ -801,3 +801,9 @@ fn fuzzed_macro_no_end() {
|
||||
let s = "{%macro super%}{%endmacro";
|
||||
assert!(Ast::from_str(s, &Syntax::default()).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fuzzed_target_recursion() {
|
||||
const TEMPLATE: &str = include_str!("../tests/target-recursion.txt");
|
||||
assert!(Ast::from_str(TEMPLATE, &Syntax::default()).is_err());
|
||||
}
|
||||
|
BIN
askama_parser/tests/target-recursion.txt
Normal file
BIN
askama_parser/tests/target-recursion.txt
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user