aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/recover_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ex_cmds/recover_spec.lua')
-rw-r--r--test/functional/ex_cmds/recover_spec.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/ex_cmds/recover_spec.lua b/test/functional/ex_cmds/recover_spec.lua
index a24a60af81..6749cfaf40 100644
--- a/test/functional/ex_cmds/recover_spec.lua
+++ b/test/functional/ex_cmds/recover_spec.lua
@@ -29,9 +29,11 @@ describe(':preserve', function()
it("saves to custom 'directory' and (R)ecovers (issue #1836)", function()
local testfile = 'testfile_recover_spec'
+ -- Note: `set swapfile` *must* go after `set directory`: otherwise it may
+ -- attempt to create a swapfile in different directory.
local init = [[
- set swapfile fileformat=unix undolevels=-1
set directory^=]]..swapdir..[[//
+ set swapfile fileformat=unix undolevels=-1
]]
source(init)
@@ -47,7 +49,7 @@ describe(':preserve', function()
--TODO(justinmk): this is an ugly hack to force `helpers` to support
--multiple sessions.
- local nvim2 = helpers.spawn({helpers.nvim_prog, '-u', 'NONE', '--embed'},
+ local nvim2 = helpers.spawn({helpers.nvim_prog, '-u', 'NONE', '-i', 'NONE', '--embed'},
true)
helpers.set_session(nvim2)