diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-01-03 14:38:12 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-01-03 14:47:29 +0100 |
commit | adb01190c44b355da61469d39d0a51dbf84c4e3f (patch) | |
tree | 7c9a66e3220cc4c47a6bf64bd3ae52278872b8e1 /test/functional/helpers.lua | |
parent | 7a81a0c073704505b420d02420f0c6b64f031983 (diff) | |
download | rneovim-adb01190c44b355da61469d39d0a51dbf84c4e3f.tar.gz rneovim-adb01190c44b355da61469d39d0a51dbf84c4e3f.tar.bz2 rneovim-adb01190c44b355da61469d39d0a51dbf84c4e3f.zip |
tests: make treesitter its own category
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 13 |
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) |