commit 406ff528245145b386d1cbe08d59243a94d120de
parent f4df49a9598151343af3fc4a30b8a42608c52bb6
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat, 6 Apr 2024 15:19:13 +0800
test: fix vimscript/server_spec leaving behind a dir (#28204)
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/test/functional/vimscript/server_spec.lua b/test/functional/vimscript/server_spec.lua
@@ -7,6 +7,7 @@ local matches = helpers.matches
local pcall_err = helpers.pcall_err
local check_close = helpers.check_close
local mkdir = helpers.mkdir
+local rmdir = helpers.rmdir
local is_os = helpers.is_os
local testlog = 'Xtest-server-log'
@@ -26,6 +27,9 @@ describe('server', function()
it('serverstart() stores sockets in $XDG_RUNTIME_DIR', function()
local dir = 'Xtest_xdg_run'
mkdir(dir)
+ finally(function()
+ rmdir(dir)
+ end)
clear({ env = { XDG_RUNTIME_DIR = dir } })
matches(dir, fn.stdpath('run'))
if not is_os('win') then