aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorGeorge Zhao <zhaozg@gmail.com>2018-01-24 18:01:14 +0800
committerJustin M. Keyes <justinkz@gmail.com>2018-01-28 19:10:18 +0100
commit499c9a15531b7a0e9736a395e8d401ceab3d24d2 (patch)
tree6ccf7a97dfc1d49acb05db8be3155cd0d9f61d0e /test/functional/helpers.lua
parent16a6f445702804a406244a129b0b3ec6d546b37d (diff)
downloadrneovim-499c9a15531b7a0e9736a395e8d401ceab3d24d2.tar.gz
rneovim-499c9a15531b7a0e9736a395e8d401ceab3d24d2.tar.bz2
rneovim-499c9a15531b7a0e9736a395e8d401ceab3d24d2.zip
test/win: fix some environment assumptions #7912
fix #7909 fix #7910
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index dfc4694272..f0e47481da 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -603,6 +603,11 @@ local function get_pathsep()
return funcs.fnamemodify('.', ':p'):sub(-1)
end
+local function pathroot()
+ local pathsep = package.config:sub(1,1)
+ return iswin() and (nvim_dir:sub(1,2)..pathsep) or '/'
+end
+
-- Returns a valid, platform-independent $NVIM_LISTEN_ADDRESS.
-- Useful for communicating with child instances.
local function new_pipename()
@@ -736,6 +741,7 @@ local module = {
meth_pcall = meth_pcall,
NIL = mpack.NIL,
get_pathsep = get_pathsep,
+ pathroot = pathroot,
missing_provider = missing_provider,
alter_slashes = alter_slashes,
hexdump = hexdump,