test: fix command_count_spec

The test hit wait_return if x or .x.swp exists in the project root directory.
This commit is contained in:
Björn Linse
2016-06-23 11:15:08 +02:00
parent c475e3f8d1
commit e8a8342132
6 changed files with 24 additions and 25 deletions

View File

@@ -221,11 +221,10 @@ local function spawn(argv, merge)
return Session.new(child_stream)
end
local function clear(extra_cmd)
local function clear(...)
local args = {unpack(nvim_argv)}
if extra_cmd ~= nil then
table.insert(args, '--cmd')
table.insert(args, extra_cmd)
for _, arg in ipairs({...}) do
table.insert(args, arg)
end
set_session(spawn(args))
end