diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-09-11 11:41:24 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-09-11 12:19:16 +0200 |
commit | 2e8e42af457732f25d00b2c5d42695353d301804 (patch) | |
tree | dc547251d627d1f55c8fd89f015511ff9669db35 /askama_parser/src/tests.rs | |
parent | dd9635ace66089bda485d4da30cfc6fe131d25f7 (diff) | |
download | askama-2e8e42af457732f25d00b2c5d42695353d301804.tar.gz askama-2e8e42af457732f25d00b2c5d42695353d301804.tar.bz2 askama-2e8e42af457732f25d00b2c5d42695353d301804.zip |
Use char_indices() to get byte indices for characters
Diffstat (limited to 'askama_parser/src/tests.rs')
-rw-r--r-- | askama_parser/src/tests.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/askama_parser/src/tests.rs b/askama_parser/src/tests.rs index ce300d3..c23d13f 100644 --- a/askama_parser/src/tests.rs +++ b/askama_parser/src/tests.rs @@ -788,3 +788,10 @@ fn test_parse_array() { )], ); } + +#[test] +fn fuzzed_unicode_slice() { + let d = "{eeuuu{b&{!!&{!!11{{ + 0!(!1q҄א!)!!!!!!n!"; + assert!(Ast::from_str(d, &Syntax::default()).is_err()); +} |