Skip to content

Commit 5ade616

Browse files
author
Andrew Ferrier
committed
fix: Abort testing if treesitter not available
1 parent d957a1b commit 5ade616

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/debugprint.lua

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
local function requiref(module)
2+
require(module)
3+
end
4+
5+
local ts_utils_test = pcall(requiref, "nvim-treesitter.ts_utils")
6+
7+
if not ts_utils_test then
8+
print("Treesitter is not installed; aborting testing.")
9+
os.exit(1)
10+
end
11+
112
local set_lines = function(lines)
213
vim.api.nvim_buf_set_lines(0, 0, -1, false, lines)
314
end

0 commit comments

Comments
 (0)