From e8a8342132d47a0f5b94248049238bf16b23715e Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Thu, 23 Jun 2016 11:15:08 +0200 Subject: test: fix command_count_spec The test hit wait_return if x or .x.swp exists in the project root directory. --- test/functional/helpers.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 5eec5638f5..6e750b31a9 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -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 -- cgit