parser: add test for target recursion overflow

This commit is contained in:
Dirkjan Ochtman 2024-01-11 13:55:46 +01:00
parent 10c38c51f6
commit 84c2094e87
2 changed files with 6 additions and 0 deletions

View File

@ -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());
}

Binary file not shown.