mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 14:59:20 +00:00
test: fix vimscript/server_spec leaving behind a dir (#28204)
This commit is contained in:
@@ -7,6 +7,7 @@ local matches = helpers.matches
|
|||||||
local pcall_err = helpers.pcall_err
|
local pcall_err = helpers.pcall_err
|
||||||
local check_close = helpers.check_close
|
local check_close = helpers.check_close
|
||||||
local mkdir = helpers.mkdir
|
local mkdir = helpers.mkdir
|
||||||
|
local rmdir = helpers.rmdir
|
||||||
local is_os = helpers.is_os
|
local is_os = helpers.is_os
|
||||||
|
|
||||||
local testlog = 'Xtest-server-log'
|
local testlog = 'Xtest-server-log'
|
||||||
@@ -26,6 +27,9 @@ describe('server', function()
|
|||||||
it('serverstart() stores sockets in $XDG_RUNTIME_DIR', function()
|
it('serverstart() stores sockets in $XDG_RUNTIME_DIR', function()
|
||||||
local dir = 'Xtest_xdg_run'
|
local dir = 'Xtest_xdg_run'
|
||||||
mkdir(dir)
|
mkdir(dir)
|
||||||
|
finally(function()
|
||||||
|
rmdir(dir)
|
||||||
|
end)
|
||||||
clear({ env = { XDG_RUNTIME_DIR = dir } })
|
clear({ env = { XDG_RUNTIME_DIR = dir } })
|
||||||
matches(dir, fn.stdpath('run'))
|
matches(dir, fn.stdpath('run'))
|
||||||
if not is_os('win') then
|
if not is_os('win') then
|
||||||
|
|||||||
Reference in New Issue
Block a user