From bd3bb128c0ff6202c1c21ffeee8e0da9ac4dce84 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 8 Jun 2022 18:04:25 -0400 Subject: [PATCH] test(ts): skip test if C parser is not available (cherry picked from commit 6b0595d7ccb9dd212f6363b2b00769c93b61f396) --- test/functional/treesitter/language_spec.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/treesitter/language_spec.lua b/test/functional/treesitter/language_spec.lua index 84e4fa5c49..30585be328 100644 --- a/test/functional/treesitter/language_spec.lua +++ b/test/functional/treesitter/language_spec.lua @@ -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()"))