diff options
Diffstat (limited to 'test/functional/shada/helpers.lua')
-rw-r--r-- | test/functional/shada/helpers.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/shada/helpers.lua b/test/functional/shada/helpers.lua index d4eb7f57bd..8e2c0cc1f6 100644 --- a/test/functional/shada/helpers.lua +++ b/test/functional/shada/helpers.lua @@ -1,15 +1,15 @@ -local helpers = require('test.functional.helpers') +local helpers = require('test.functional.helpers')(nil) local spawn, set_session, meths, nvim_prog = helpers.spawn, helpers.set_session, helpers.meths, helpers.nvim_prog local write_file, merge_args = helpers.write_file, helpers.merge_args local mpack = require('mpack') -local tmpname = os.tmpname() +local tmpname = helpers.tmpname() local additional_cmd = '' -local function nvim_argv() - local argv = {nvim_prog, '-u', 'NONE', '-i', tmpname, '-N', +local function nvim_argv(shada_file) + local argv = {nvim_prog, '-u', 'NONE', '-i', shada_file or tmpname, '-N', '--cmd', 'set shortmess+=I background=light noswapfile', '--cmd', additional_cmd, '--embed'} @@ -20,8 +20,8 @@ local function nvim_argv() end end -local reset = function() - set_session(spawn(nvim_argv())) +local reset = function(shada_file) + set_session(spawn(nvim_argv(shada_file))) meths.set_var('tmpname', tmpname) end |