aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
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 6c0288087a..6055cc3c59 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -183,11 +183,16 @@ local function spawn(argv)
return session
end
-local function clear()
+local function clear(extra_cmd)
if session then
session:exit(0)
end
- session = spawn(nvim_argv)
+ local args = {unpack(nvim_argv)}
+ if extra_cmd ~= nil then
+ table.insert(args, '--cmd')
+ table.insert(args, extra_cmd)
+ end
+ session = spawn(args)
end
local function insert(...)