aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-11-30 02:02:55 +0300
committerZyX <kp-pav@yandex.ru>2017-11-30 02:02:55 +0300
commitb588ccddd7f5998ce7d9780463480ca844963859 (patch)
tree78f1e0f58209385aa63e0e25e071a5893635790d /test/functional/helpers.lua
parentde45ec0146486c49719ff6f6dcceb4914b471c7a (diff)
parent4618c9c43b2fe052332329b347ac10b4b1db94b5 (diff)
downloadrneovim-b588ccddd7f5998ce7d9780463480ca844963859.tar.gz
rneovim-b588ccddd7f5998ce7d9780463480ca844963859.tar.bz2
rneovim-b588ccddd7f5998ce7d9780463480ca844963859.zip
Merge branch 'master' into expression-parser
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 272d2045c9..da334d4ac6 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -603,6 +603,15 @@ local function get_pathsep()
return funcs.fnamemodify('.', ':p'):sub(-1)
end
+-- Returns a valid, platform-independent $NVIM_LISTEN_ADDRESS.
+-- Useful for communicating with child instances.
+local function new_pipename()
+ -- HACK: Start a server temporarily, get the name, then stop it.
+ local pipename = nvim_eval('serverstart()')
+ funcs.serverstop(pipename)
+ return pipename
+end
+
local function missing_provider(provider)
if provider == 'ruby' then
local prog = funcs['provider#' .. provider .. '#Detect']()
@@ -732,6 +741,7 @@ local module = {
missing_provider = missing_provider,
alter_slashes = alter_slashes,
hexdump = hexdump,
+ new_pipename = new_pipename,
}
return function(after_each)