Skip to content

Commit

Permalink
Merge pull request #18905 from neovim/backport-18903-to-release-0.7
Browse files Browse the repository at this point in the history
[Backport release-0.7] test(ts): skip test if C parser is not available
  • Loading branch information
jamessan committed Jun 9, 2022
2 parents d317cb2 + bd3bb12 commit fc4e4b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/functional/treesitter/language_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe('treesitter API', function()
end)

it('checks if vim.treesitter.get_parser tries to create a new parser on filetype change', function ()
if pending_c_parser(pending) then return end
command("set filetype=c")
-- Should not throw an error when filetype is c
eq('c', exec_lua("return vim.treesitter.get_parser(0):lang()"))
Expand Down

0 comments on commit fc4e4b3

Please sign in to comment.