mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
functests: Test invalid behaviour
Test correctly fail for oneline ruby, python and python3.
This commit is contained in:
@@ -566,6 +566,19 @@ local function get_pathsep()
|
||||
return funcs.fnamemodify('.', ':p'):sub(-1)
|
||||
end
|
||||
|
||||
local function check_provider(provider)
|
||||
if provider == 'ruby' then
|
||||
local prog = funcs['provider#' .. provider .. '#Detect']()
|
||||
return prog ~= ''
|
||||
elseif provider == 'python' or provider == 'python3' then
|
||||
local py_major_version = (provider == 'python3' and 3 or 2)
|
||||
local errors = funcs['provider#pythonx#Detect'](py_major_version)[2]
|
||||
return errors == ''
|
||||
else
|
||||
assert(false, 'Unknown provider: ' .. provider)
|
||||
end
|
||||
end
|
||||
|
||||
local module = {
|
||||
prepend_argv = prepend_argv,
|
||||
clear = clear,
|
||||
@@ -632,6 +645,7 @@ local module = {
|
||||
meth_pcall = meth_pcall,
|
||||
NIL = mpack.NIL,
|
||||
get_pathsep = get_pathsep,
|
||||
check_provider = check_provider,
|
||||
}
|
||||
|
||||
return function(after_each)
|
||||
|
||||
Reference in New Issue
Block a user