aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-09-22 10:20:23 +0200
committerGitHub <noreply@github.com>2018-09-22 10:20:23 +0200
commitc236e80cf3dfae6df5c43ecfb19c7629c9884f7b (patch)
tree426eb0f7525621d9760bb2cbf394d5c42b691775 /test/functional/helpers.lua
parent7f990741f7018b5e52833f2da6913b97c6d2d5ee (diff)
parent4da5cb38d396d76d8072815d150725f7c9a85078 (diff)
downloadrneovim-c236e80cf3dfae6df5c43ecfb19c7629c9884f7b.tar.gz
rneovim-c236e80cf3dfae6df5c43ecfb19c7629c9884f7b.tar.bz2
rneovim-c236e80cf3dfae6df5c43ecfb19c7629c9884f7b.zip
Merge pull request #9024 from bfredl/embed_ui2
always wait for UI with --embed, unless --headless is supplied
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 8823a6e003..a51eca7fdc 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -330,6 +330,7 @@ local function clear(...)
local new_args
local env = nil
local opts = select(1, ...)
+ local headless = true
if type(opts) == 'table' then
if opts.env then
local env_tbl = {}
@@ -355,15 +356,19 @@ local function clear(...)
end
end
new_args = opts.args or {}
+ if opts.headless == false then
+ headless = false
+ end
else
new_args = {...}
end
+ if headless then
+ table.insert(args, '--headless')
+ end
for _, arg in ipairs(new_args) do
table.insert(args, arg)
end
set_session(spawn(args, nil, env))
- -- Dummy request so that --embed continues past UI initialization
- session:request('nvim_eval', "0")
end
local function insert(...)