fix(tests): use pending_c_parser when needed

This commit is contained in:
bfredl
2022-08-25 20:49:27 +02:00
parent e5fe41198c
commit 73ee2b35d1
2 changed files with 7 additions and 1 deletions

View File

@@ -87,6 +87,7 @@ describe('treesitter language API', function()
end)
it('retrieve the tree given a range', function ()
if pending_c_parser(pending) then return end
insert([[
int main() {
int x = 3;
@@ -101,6 +102,7 @@ describe('treesitter language API', function()
end)
it('retrieve the node given a range', function ()
if pending_c_parser(pending) then return end
insert([[
int main() {
int x = 3;

View File

@@ -4,12 +4,16 @@ local clear = helpers.clear
local insert = helpers.insert
local eq = helpers.eq
local exec_lua = helpers.exec_lua
local pending_c_parser = helpers.pending_c_parser
before_each(clear)
describe('treesitter utils', function()
clear()
before_each(clear)
it('can find an ancestor', function()
if pending_c_parser(pending) then return end
insert([[
int main() {
int x = 3;