Add regression test for infinite loop.
This commit is contained in:
parent
26707be38d
commit
982407774e
1 changed files with 14 additions and 0 deletions
|
@ -197,3 +197,17 @@ fn test_pr12() {
|
|||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_issue13() {
|
||||
let s = "{---";
|
||||
let Err(error) = run_parser(s) else { panic!() };
|
||||
assert_eq!(
|
||||
error.info(),
|
||||
"while parsing a flow mapping, did not find expected ',' or '}'"
|
||||
);
|
||||
assert_eq!(
|
||||
error.to_string(),
|
||||
"while parsing a flow mapping, did not find expected ',' or '}' at byte 4 line 2 column 1"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue