aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-01-03 18:28:21 +0100
committerGitHub <noreply@github.com>2021-01-03 18:28:21 +0100
commitae63dc264a3107a02bb9338fe328455bc1f14517 (patch)
treed6058974f95cee73aa36f969d6f37e451bfb5e9a /test/functional/helpers.lua
parent7a81a0c073704505b420d02420f0c6b64f031983 (diff)
parenta58d96a7edcf94913ce29135f06d83ca2c22b202 (diff)
downloadrneovim-ae63dc264a3107a02bb9338fe328455bc1f14517.tar.gz
rneovim-ae63dc264a3107a02bb9338fe328455bc1f14517.tar.bz2
rneovim-ae63dc264a3107a02bb9338fe328455bc1f14517.zip
Merge pull request #13669 from bfredl/sortsplice
buffer updates: mark sorted region as changed.
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 0829560b9c..4acb1a7d8d 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -725,6 +725,19 @@ function module.pending_win32(pending_fn)
end
end
+function module.pending_c_parser(pending_fn)
+ local status, msg = unpack(module.exec_lua([[ return {pcall(vim.treesitter.require_language, 'c')} ]]))
+ if not status then
+ if module.isCI() then
+ error("treesitter C parser not found, required on CI: " .. msg)
+ else
+ pending_fn 'no C parser, skipping'
+ return true
+ end
+ end
+ return false
+end
+
-- Calls pending() and returns `true` if the system is too slow to
-- run fragile or expensive tests. Else returns `false`.
function module.skip_fragile(pending_fn, cond)