aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-01-22 22:07:14 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-01-24 19:26:53 +0100
commitb280d57db9845359186bfb5167e1559b6184f8d5 (patch)
tree0ee29ba803649344baf383994c710cb857d68d62 /test/functional/helpers.lua
parentae3eed53d6100598b6d26fe58e3e97541e03f3c1 (diff)
downloadrneovim-b280d57db9845359186bfb5167e1559b6184f8d5.tar.gz
rneovim-b280d57db9845359186bfb5167e1559b6184f8d5.tar.bz2
rneovim-b280d57db9845359186bfb5167e1559b6184f8d5.zip
refactor: rewrite ruby provider in lua
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index fe6d53ab7b..d1d26919a0 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -936,17 +936,14 @@ end
--- @param provider string
--- @return string|boolean?
function module.missing_provider(provider)
- if provider == 'ruby' then
+ if provider == 'ruby' or provider == 'perl' then
--- @type string?
- local e = module.fn['provider#ruby#Detect']()[2]
+ local e = module.exec_lua("return {require('vim.provider." .. provider .. "').detect()}")[2]
return e ~= '' and e or false
elseif provider == 'node' then
--- @type string?
local e = module.fn['provider#node#Detect']()[2]
return e ~= '' and e or false
- elseif provider == 'perl' then
- --- @type string?
- return module.exec_lua([[return {require('vim.provider.perl').detect()}]])[2]
elseif provider == 'python' then
return module.exec_lua([[return {require('vim.provider.python').detect_by_module('neovim')}]])[2]
end