Incorrect parsing of unbalanced braces based on issue 6914 (#7621)

This commit is contained in:
Kangaxx-0
2023-01-24 00:05:46 -08:00
committed by GitHub
parent ef660be285
commit 0bb2e47c98
6 changed files with 38 additions and 6 deletions

View File

@ -396,7 +396,7 @@ proptest! {
{{"{0}": "sam"}} | to nuon | from nuon;
"#, c).as_ref()
));
assert!(actual.err.is_empty() || actual.err.contains("Unexpected end of code") || actual.err.contains("only strings can be keys"));
assert!(actual.err.is_empty() || actual.err.contains("Unexpected end of code") || actual.err.contains("only strings can be keys") || actual.err.contains("unbalanced { and }"));
// The second is for weird escapes due to backslashes
// The third is for chars like '0'
}