diff options
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ex_cmds/script_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/helpers.lua | 9 | ||||
-rw-r--r-- | test/functional/provider/python3_spec.lua | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/test/functional/ex_cmds/script_spec.lua b/test/functional/ex_cmds/script_spec.lua index ebdaa0f656..4c963c5da7 100644 --- a/test/functional/ex_cmds/script_spec.lua +++ b/test/functional/ex_cmds/script_spec.lua @@ -96,7 +96,7 @@ describe('script_get-based command', function() -- Provider-based scripts test_garbage_exec('ruby', not missing_provider('ruby')) - test_garbage_exec('python3', not missing_provider('python3')) + test_garbage_exec('python3', not missing_provider('python')) -- Missing scripts test_garbage_exec('python', false) 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 diff --git a/test/functional/provider/python3_spec.lua b/test/functional/provider/python3_spec.lua index 1419d7f651..9bde57f777 100644 --- a/test/functional/provider/python3_spec.lua +++ b/test/functional/provider/python3_spec.lua @@ -13,7 +13,7 @@ local dedent = helpers.dedent do clear() - local reason = missing_provider('python3') + local reason = missing_provider('python') if reason then it(':python3 reports E319 if provider is missing', function() local expected = [[Vim%(py3.*%):E319: No "python3" provider found.*]] |