Test demonstrating non-UT8 input failure
This commit is contained in:
parent
91558f0a0e
commit
37f2a4745f
1 changed files with 10 additions and 0 deletions
|
|
@ -473,6 +473,16 @@ describe("Parser", [&]() {
|
|||
AssertThat(ts_node_end_char(root), Equals(strlen("'OOO - DD';")));
|
||||
AssertThat(ts_node_end_byte(root), Equals(strlen("'\u03A9\u03A9\u03A9 \u2014 \u0394\u0394';")));
|
||||
});
|
||||
|
||||
it("handles non-UTF8 characters", [&]() {
|
||||
// ts_document_set_logger(document, stderr_logger_new(true));
|
||||
ts_document_print_debugging_graphs(document, true);
|
||||
ts_document_set_language(document, load_real_language("javascript"));
|
||||
ts_document_set_input_string(document, "cons\xeb\x00e=ls\x83l6hi');\x0a");
|
||||
ts_document_parse(document);
|
||||
|
||||
AssertThat(ts_node_end_byte(root), Equals(strlen("cons\xeb\x00e=ls\x83l6hi');\x0a")));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue