Max Brunsfeld
49c632ae90
Fix error in test command when queries folder does not exist
...
Fixes #468
2019-10-21 09:22:24 -07:00
Max Brunsfeld
e14e285a10
cli: Check queries when running tree-sitter test
2019-10-18 14:44:16 -07:00
Max Brunsfeld
a8dedbee0d
In test command, use the longest line of dashes as the test divider
2019-09-05 09:59:59 -07:00
Rob Donnelly
9ba5f25594
Ignore hidden files in grammar test directories ( #430 )
...
This fixes "stream did not contain valid UTF-8" error due to
`tree-sitter test` attempting to Vim's parse hidden binary swap files.
2019-08-19 09:03:12 -07:00
Max Brunsfeld
bd466febb4
highlight: Fix panic when cancelled before parsing a nested document
2019-07-16 14:34:24 -07:00
Max Brunsfeld
d274e81d0d
Overhaul CLI error handling to allow multiple levels of context
2019-05-30 16:52:55 -07:00
Max Brunsfeld
65d1ce8593
lib: Include fields in ts_node_string output
...
This allows you to assert about fields in tests. But if your test
s-expression does *not* include fields, the fields will be stripped from
the regexp before comparison.
2019-02-13 09:47:21 -08:00
Max Brunsfeld
50281637d7
binding: Make parse methods more convenient
...
* Rename parse_str to parse and make it polymorphic.
* Rename parse_utf8 to parse_with, since it is now the callback-based
version of parse
* Add a parse_utf16 method analogous to parse
* Rename existing parse_utf16 method to parse_utf16_with
This brings in the changes from tree-sitter/rust-tree-sitter#5
2019-02-05 10:59:33 -08:00
Max Brunsfeld
59f7511b1c
Fix test command's exit code
2019-02-04 09:12:25 -08:00
Max Brunsfeld
4cac85fec4
Add benchmark script
...
* Structure `cli` crate as both a library and an executable, so that
benchmarks can import code from the crate.
* Import macros in the Rust 2018 style.
2019-02-01 15:17:35 -08:00
Max Brunsfeld
6d8ef48dad
Make test subcommand exit 1 if tests fail
2019-01-27 09:53:49 -08:00
Max Brunsfeld
233d616ebf
Add random mutation tests
2019-01-25 12:05:21 -08:00
Max Brunsfeld
3d11388cd1
Fix test subcommand bugs
...
* Log session was dropped before the parser
* Whitespace between close parens was not stripped
2019-01-17 12:40:21 -08:00
Max Brunsfeld
d8ab36b2a5
Fix bugs in handling tokens that overlap with separators
2019-01-15 13:21:48 -08:00
Max Brunsfeld
5c3c1dd0bd
Get logging flags working properly with test script
2019-01-15 13:21:48 -08:00
Max Brunsfeld
0d85a1ef53
Exclude final newlines from inputs when parsing corpus files
2019-01-11 09:48:45 -08:00
Max Brunsfeld
98807d2053
Add debug and debug-graph flags to parse and test commands
2019-01-08 21:03:51 -08:00
Max Brunsfeld
6c4d00aad5
Print diffs when tests fail
2019-01-07 22:01:40 -08:00
Max Brunsfeld
8291d294fb
Add test subcommand
...
Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
2019-01-07 17:57:27 -08:00