tree-sitter/cli/src/tests
Riley Bruins 81e7410b78 fix(rust): prevent overflow in error message calculation
**Problem:** When encountering an invalid symbol at the beginning of the
file, the rust bindings attempt to index the character at position -1 of
the query source, which leads to an overflow and thus invalid character
index which causes a panic.

**Solution:** Bounds check the offset before performing the subtraction.

(cherry picked from commit dff828cdbe)
2025-07-25 12:14:35 +02:00
..
helpers Fix crash w/ goto_previous_sibling when parent node has leading extra child (#4472) (#4473) 2025-05-27 17:35:57 -07:00
proc_macro build: bump dependencies 2025-01-26 14:15:01 -05:00
async_context_test.rs fix(rust): adapt to some new nightly lints 2025-03-02 23:20:08 +01:00
corpus_test.rs perf: reserve Vec capacities where appropriate 2025-07-09 22:33:57 -04:00
detect_language.rs feat(loader): support multi-barreled file extensions 2024-11-10 03:44:33 +01:00
highlight_test.rs perf: reserve Vec capacities where appropriate 2025-07-09 22:33:57 -04:00
language_test.rs fix(test): update expected tree-sitter-rust supertypes 2025-03-02 23:20:08 +01:00
mod.rs feat: add the semantic version to TSLanguage, and expose an API for retrieving it 2025-01-25 01:14:30 -05:00
node_test.rs Fix crash w/ goto_previous_sibling when parent node has leading extra child (#4472) (#4473) 2025-05-27 17:35:57 -07:00
parser_hang_test.rs feat: add the semantic version to TSLanguage, and expose an API for retrieving it 2025-01-25 01:14:30 -05:00
parser_test.rs Fix crash w/ goto_previous_sibling when parent node has leading extra child (#4472) (#4473) 2025-05-27 17:35:57 -07:00
pathological_test.rs style: format imports 2024-04-11 22:35:43 -04:00
query_test.rs fix(rust): prevent overflow in error message calculation 2025-07-25 12:14:35 +02:00
tags_test.rs fix(rust): address new clippy lint 2025-05-03 22:00:55 +02:00
test_highlight_test.rs feat(cli): verify assertions for every carat in tests, not just the first one 2024-11-28 23:25:49 -05:00
test_tags_test.rs feat(cli): verify assertions for every carat in tests, not just the first one 2024-11-28 23:25:49 -05:00
text_provider_test.rs feat(rust): remove usage of deprecated functions 2024-10-31 21:58:35 -04:00
tree_test.rs Fully fix field underflow in go_to_previous_sibling (#4483) (#4485) 2025-06-02 16:12:16 -07:00
wasm_language_test.rs feat: remove lazy_static in favor of LazyLock 2025-01-21 00:21:35 -05:00