diff options
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 10 |
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) |