aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-27 17:11:34 +0200
committerGitHub <noreply@github.com>2019-04-27 17:11:34 +0200
commit920ec8181b2bf7547688ed877252a1f2127db198 (patch)
tree7cc6cfd90454d42b7fd9ab1f988608a6db08f371 /test/functional/core
parente5b53381a27861578498dab3ab9ba7b989677787 (diff)
parent698c4f662d3a30fab1e48dbe7586617a9031a6ea (diff)
downloadrneovim-920ec8181b2bf7547688ed877252a1f2127db198.tar.gz
rneovim-920ec8181b2bf7547688ed877252a1f2127db198.tar.bz2
rneovim-920ec8181b2bf7547688ed877252a1f2127db198.zip
Merge #9915 'test: clear(): args_rm param'
Diffstat (limited to 'test/functional/core')
-rw-r--r--test/functional/core/startup_spec.lua24
1 files changed, 10 insertions, 14 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua
index 76e242b1e2..f77af836a6 100644
--- a/test/functional/core/startup_spec.lua
+++ b/test/functional/core/startup_spec.lua
@@ -13,9 +13,7 @@ local nvim_set = helpers.nvim_set
local read_file = helpers.read_file
local retry = helpers.retry
local rmdir = helpers.rmdir
-local set_session = helpers.set_session
local sleep = helpers.sleep
-local spawn = helpers.spawn
local iswin = helpers.iswin
local write_file = helpers.write_file
@@ -228,10 +226,6 @@ describe('sysinit', function()
local vimdir = 'Xvim'
local xhome = 'Xhome'
local pathsep = helpers.get_pathsep()
- local argv = {
- nvim_prog, '--headless', '--embed', '-i', 'NONE', '-n',
- '--cmd', 'set nomore undodir=. directory=. belloff='
- }
before_each(function()
rmdir(xdgdir)
@@ -260,19 +254,21 @@ describe('sysinit', function()
end)
it('prefers XDG_CONFIG_DIRS over VIM', function()
- set_session(spawn(argv, nil,
- { 'HOME='..xhome,
- 'XDG_CONFIG_DIRS='..xdgdir,
- 'VIM='..vimdir }))
+ clear{args={'--cmd', 'set nomore undodir=. directory=. belloff='},
+ args_rm={'-u', '--cmd'},
+ env={ HOME=xhome,
+ XDG_CONFIG_DIRS=xdgdir,
+ VIM=vimdir }}
eq('loaded 1 xdg 1 vim 0',
eval('printf("loaded %d xdg %d vim %d", g:loaded, get(g:, "xdg", 0), get(g:, "vim", 0))'))
end)
it('uses VIM if XDG_CONFIG_DIRS unset', function()
- set_session(spawn(argv, nil,
- { 'HOME='..xhome,
- 'XDG_CONFIG_DIRS=',
- 'VIM='..vimdir }))
+ clear{args={'--cmd', 'set nomore undodir=. directory=. belloff='},
+ args_rm={'-u', '--cmd'},
+ env={ HOME=xhome,
+ XDG_CONFIG_DIRS='',
+ VIM=vimdir }}
eq('loaded 1 xdg 0 vim 1',
eval('printf("loaded %d xdg %d vim %d", g:loaded, get(g:, "xdg", 0), get(g:, "vim", 0))'))
end)