aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-01-07 13:05:03 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-01-22 22:36:40 +0100
commiteb5d15e3838f53e2fcd25989c88db87458e9f984 (patch)
treede13432021adb8632ed61cd9bbe4270eaec0674c /test/functional/helpers.lua
parent13d50c3b13fb6f2bba948e50fefee451e0a90487 (diff)
downloadrneovim-eb5d15e3838f53e2fcd25989c88db87458e9f984.tar.gz
rneovim-eb5d15e3838f53e2fcd25989c88db87458e9f984.tar.bz2
rneovim-eb5d15e3838f53e2fcd25989c88db87458e9f984.zip
refactor: rewrite python provider in lua
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index eddf336b6f..159016b484 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -932,17 +932,14 @@ function module.new_pipename()
end
--- @param provider string
---- @return string|false?
+--- @return string|boolean?
function module.missing_provider(provider)
if provider == 'ruby' or provider == 'node' or provider == 'perl' then
--- @type string?
local e = module.fn['provider#' .. provider .. '#Detect']()[2]
return e ~= '' and e or false
- elseif provider == 'python' or provider == 'python3' then
- local py_major_version = (provider == 'python3' and 3 or 2)
- --- @type string?
- local e = module.fn['provider#pythonx#Detect'](py_major_version)[2]
- return e ~= '' and e or false
+ elseif provider == 'python' then
+ return module.exec_lua([[return {require('vim.provider.python').detect_by_module('neovim')}]])[2]
end
assert(false, 'Unknown provider: ' .. provider)
end