Fix test now that JSON grammar has slightly changed

This commit is contained in:
Max Brunsfeld 2018-12-01 21:26:34 -08:00
parent 41df6d94b7
commit 741fb3c5a1

View file

@ -166,8 +166,8 @@ describe("Parser", [&]() {
describe("when there is an unexpected string at the end of a token", [&]() {
it("computes the error's size and position correctly", [&]() {
ts_parser_set_language(parser, load_real_language("json"));
set_text(" [123, \"hi\n, true]");
assert_root_node("(value (array (number) (ERROR (UNEXPECTED '\\n')) (true)))");
set_text(" [123, truue\n, true]");
assert_root_node("(value (array (number) (ERROR (UNEXPECTED 'u')) (true)))");
});
});