Fix unit test for invalid utf8 at EOF

This commit is contained in:
Max Brunsfeld 2018-04-17 17:33:45 -07:00
parent e8cfb9ced0
commit d5cfc06fa2

View file

@ -196,13 +196,13 @@ describe("Parser", [&]() {
char *string = (char *)malloc(1);
string[0] = '\xdf';
ts_document_set_language(document, load_real_language("javascript"));
ts_document_set_language(document, load_real_language("json"));
ts_document_set_input_string_with_length(document, string, 1);
ts_document_parse(document);
free(string);
assert_root_node("(program (ERROR (UNEXPECTED INVALID)))");
assert_root_node("(ERROR (UNEXPECTED INVALID))");
});
});