diff options
| author | ZyX <kp-pav@yandex.ru> | 2017-05-12 20:03:05 +0300 | 
|---|---|---|
| committer | ZyX <kp-pav@yandex.ru> | 2017-05-13 03:06:30 +0300 | 
| commit | 8b171b8c507dd9db01abee169d3a71e33f8e8ff4 (patch) | |
| tree | bf4ced4ac97862f0c17c207bed31861a2caecc9a /test/functional/helpers.lua | |
| parent | d9023b84e63f51611cf55f72ca5e021d64ba7ce9 (diff) | |
| download | rneovim-8b171b8c507dd9db01abee169d3a71e33f8e8ff4.tar.gz rneovim-8b171b8c507dd9db01abee169d3a71e33f8e8ff4.tar.bz2 rneovim-8b171b8c507dd9db01abee169d3a71e33f8e8ff4.zip  | |
functests: Test invalid behaviour
Test correctly fail for oneline ruby, python and python3.
Diffstat (limited to 'test/functional/helpers.lua')
| -rw-r--r-- | test/functional/helpers.lua | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 1be70f917c..3ec4532cfe 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -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)  | 
