40 stable releases
Uses new Rust 2024
| 2.12.4 | Jan 18, 2026 |
|---|---|
| 2.4.7 | Dec 30, 2025 |
| 1.3.0 | Dec 13, 2025 |
| 0.901.0 | Dec 9, 2025 |
#530 in Testing
356 downloads per month
Used in 103 crates
320KB
7K
SLoC
Test harness for arborium grammar crates.
This crate provides utilities for testing tree-sitter grammars and their queries.
Usage
In your grammar crate's lib.rs tests:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_grammar() {
arborium_test_harness::test_grammar(
language(),
"rust",
HIGHLIGHTS_QUERY,
INJECTIONS_QUERY,
LOCALS_QUERY,
env!("CARGO_MANIFEST_DIR"),
);
}
}
arborium-test-harness
Test harness for arborium grammar crates.
Purpose
Provides utilities for testing tree-sitter grammars and their highlight/injection queries.
Usage
In your grammar crate's tests:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_grammar() {
arborium_test_harness::test_grammar(
language(),
"rust",
HIGHLIGHTS_QUERY,
INJECTIONS_QUERY,
LOCALS_QUERY,
);
}
}
The harness validates that:
- The grammar compiles correctly
- Highlight queries are syntactically valid
- Injection queries parse without errors
Part of the arborium project. See arborium.dev for more information.
Dependencies
~3–6MB
~115K SLoC