Fix tests, adapt to tree-sitter-json 40a81c01a40ac48744e0c8ccabbaba1920441199

This commit is contained in:
Andrew Hlynskyi 2023-04-22 12:06:36 +03:00
parent ae1556647a
commit 85a588b5b0
2 changed files with 42 additions and 17 deletions

View file

@ -276,7 +276,10 @@ fn test_parsing_invalid_chars_at_eof() {
let mut parser = Parser::new();
parser.set_language(get_language("json")).unwrap();
let tree = parser.parse(b"\xdf", None).unwrap();
assert_eq!(tree.root_node().to_sexp(), "(ERROR (UNEXPECTED INVALID))");
assert_eq!(
tree.root_node().to_sexp(),
"(document (ERROR (UNEXPECTED INVALID)))"
);
}
#[test]