diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2024-01-17 22:20:32 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2024-01-18 07:39:25 +0100 |
commit | 250828a6d25148d35d394975aa9f45e89c734013 (patch) | |
tree | 1af7715eb305c4754161eb85db48c13abd6a7562 /askama_parser/src/tests.rs | |
parent | 2c7759c0d0534dd9903ebd97b13c4c44320a9aad (diff) | |
download | askama-250828a6d25148d35d394975aa9f45e89c734013.tar.gz askama-250828a6d25148d35d394975aa9f45e89c734013.tar.bz2 askama-250828a6d25148d35d394975aa9f45e89c734013.zip |
Yield error on deep AST recursion
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 703dd6a..742f0f3 100644 --- a/askama_parser/src/tests.rs +++ b/askama_parser/src/tests.rs @@ -807,3 +807,9 @@ fn fuzzed_target_recursion() { const TEMPLATE: &str = include_str!("../tests/target-recursion.txt"); assert!(Ast::from_str(TEMPLATE, &Syntax::default()).is_err()); } + +#[test] +fn fuzzed_unary_recursion() { + const TEMPLATE: &str = include_str!("../tests/unary-recursion.txt"); + assert!(Ast::from_str(TEMPLATE, &Syntax::default()).is_err()); +} |