aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-01 22:56:41 -0700
committerGitHub <noreply@github.com>2019-09-01 22:56:41 -0700
commit099445cc07b0154edc6ecd562a28e86c87c0096b (patch)
treebb539bd3877fc0545b1c7db13039b357477e5758 /test/functional/helpers.lua
parent7bb029eeef65f57d94cef4e4b709e6c3ebefcf08 (diff)
parentead39d6ce6d1c5e5b6130c6823d071889c207bde (diff)
downloadrneovim-099445cc07b0154edc6ecd562a28e86c87c0096b.tar.gz
rneovim-099445cc07b0154edc6ecd562a28e86c87c0096b.tar.bz2
rneovim-099445cc07b0154edc6ecd562a28e86c87c0096b.zip
Merge #10804 'CI/OpenBSD: functional tests'
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua18
1 files changed, 7 insertions, 11 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 73f3c4c917..c34849b439 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -48,7 +48,7 @@ if module.nvim_dir == module.nvim_prog then
end
local tmpname = global_helpers.tmpname
-local uname = global_helpers.uname
+local iswin = global_helpers.iswin
local prepend_argv
if os.getenv('VALGRIND') then
@@ -287,10 +287,6 @@ module.os_name = (function()
end)
end)()
-function module.iswin()
- return package.config:sub(1,1) == '\\'
-end
-
-- Executes a VimL function.
-- Fails on VimL error, but does not update v:errmsg.
function module.call(name, ...)
@@ -304,7 +300,7 @@ local function nvim_feed(input)
local written = module.request('nvim_input', input)
if written == nil then
module.assert_alive()
- error('nvim_input returned nil (Nvim process terminated?)')
+ error('crash? (nvim_input returned nil)')
end
input = input:sub(written + 1)
end
@@ -592,7 +588,7 @@ end
-- Checks that the Nvim session did not terminate.
function module.assert_alive()
- eq(2, module.eval('1+1'))
+ assert(2 == module.eval('1+1'), 'crash? request failed')
end
local function do_rmdir(path)
@@ -672,7 +668,7 @@ end
-- Helper to skip tests. Returns true in Windows systems.
-- pending_fn is pending() from busted
function module.pending_win32(pending_fn)
- if uname() == 'Windows' then
+ if iswin() then
if pending_fn ~= nil then
pending_fn('FIXME: Windows', function() end)
end
@@ -734,12 +730,12 @@ function module.redir_exec(cmd)
end
function module.get_pathsep()
- return module.iswin() and '\\' or '/'
+ return iswin() and '\\' or '/'
end
function module.pathroot()
local pathsep = package.config:sub(1,1)
- return module.iswin() and (module.nvim_dir:sub(1,2)..pathsep) or '/'
+ return iswin() and (module.nvim_dir:sub(1,2)..pathsep) or '/'
end
-- Returns a valid, platform-independent $NVIM_LISTEN_ADDRESS.
@@ -765,7 +761,7 @@ function module.missing_provider(provider)
end
function module.alter_slashes(obj)
- if not module.iswin() then
+ if not iswin() then
return obj
end
if type(obj) == 'string' then