diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-27 17:11:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-27 17:11:34 +0200 |
commit | 920ec8181b2bf7547688ed877252a1f2127db198 (patch) | |
tree | 7cc6cfd90454d42b7fd9ab1f988608a6db08f371 /test/functional/ex_cmds | |
parent | e5b53381a27861578498dab3ab9ba7b989677787 (diff) | |
parent | 698c4f662d3a30fab1e48dbe7586617a9031a6ea (diff) | |
download | rneovim-920ec8181b2bf7547688ed877252a1f2127db198.tar.gz rneovim-920ec8181b2bf7547688ed877252a1f2127db198.tar.bz2 rneovim-920ec8181b2bf7547688ed877252a1f2127db198.zip |
Merge #9915 'test: clear(): args_rm param'
Diffstat (limited to 'test/functional/ex_cmds')
-rw-r--r-- | test/functional/ex_cmds/oldfiles_spec.lua | 12 | ||||
-rw-r--r-- | test/functional/ex_cmds/wviminfo_spec.lua | 16 |
2 files changed, 13 insertions, 15 deletions
diff --git a/test/functional/ex_cmds/oldfiles_spec.lua b/test/functional/ex_cmds/oldfiles_spec.lua index e2958c2924..802c3f68c6 100644 --- a/test/functional/ex_cmds/oldfiles_spec.lua +++ b/test/functional/ex_cmds/oldfiles_spec.lua @@ -1,18 +1,18 @@ local Screen = require('test.functional.ui.screen') local helpers = require('test.functional.helpers')(after_each) +local clear = helpers.clear local buf, eq, feed_command = helpers.curbufmeths, helpers.eq, helpers.feed_command -local feed, nvim_prog, wait = helpers.feed, helpers.nvim_prog, helpers.wait -local ok, set_session, spawn = helpers.ok, helpers.set_session, helpers.spawn +local feed, wait = helpers.feed, helpers.wait +local ok = helpers.ok local eval = helpers.eval local shada_file = 'Xtest.shada' local function _clear() - set_session(spawn({nvim_prog, '--embed', '--headless', '-u', 'NONE', - -- Need shada for these tests. - '-i', shada_file, - '--cmd', 'set noswapfile undodir=. directory=. viewdir=. backupdir=. belloff= noshowcmd noruler'})) + clear{args={'-i', shada_file, -- Need shada for these tests. + '--cmd', 'set noswapfile undodir=. directory=. viewdir=. backupdir=. belloff= noshowcmd noruler'}, + args_rm={'-i', '--cmd'}} end describe(':oldfiles', function() diff --git a/test/functional/ex_cmds/wviminfo_spec.lua b/test/functional/ex_cmds/wviminfo_spec.lua index df0b9df5dd..7c00daf1d7 100644 --- a/test/functional/ex_cmds/wviminfo_spec.lua +++ b/test/functional/ex_cmds/wviminfo_spec.lua @@ -1,23 +1,21 @@ local helpers = require('test.functional.helpers')(after_each) local lfs = require('lfs') -local command, eq, neq, spawn, nvim_prog, set_session, write_file = - helpers.command, helpers.eq, helpers.neq, helpers.spawn, - helpers.nvim_prog, helpers.set_session, helpers.write_file +local clear = helpers.clear +local command, eq, neq, write_file = + helpers.command, helpers.eq, helpers.neq, helpers.write_file local iswin = helpers.iswin local read_file = helpers.read_file describe(':wshada', function() local shada_file = 'wshada_test' - local session before_each(function() - -- Override the default session because we need 'swapfile' for these tests. - session = spawn({nvim_prog, '-u', 'NONE', '-i', iswin() and 'nul' or '/dev/null', '--embed', - '--cmd', 'set swapfile'}) - set_session(session) + clear{args={'-i', iswin() and 'nul' or '/dev/null', + -- Need 'swapfile' for these tests. + '--cmd', 'set swapfile undodir=. directory=. viewdir=. backupdir=. belloff= noshowcmd noruler'}, + args_rm={'-n', '-i', '--cmd'}} end) after_each(function () - session:close() os.remove(shada_file) end) |