aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/watch_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua/watch_spec.lua')
-rw-r--r--test/functional/lua/watch_spec.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/functional/lua/watch_spec.lua b/test/functional/lua/watch_spec.lua
index f041f4f1b6..d802a955fa 100644
--- a/test/functional/lua/watch_spec.lua
+++ b/test/functional/lua/watch_spec.lua
@@ -3,7 +3,6 @@ local eq = helpers.eq
local exec_lua = helpers.exec_lua
local clear = helpers.clear
local is_os = helpers.is_os
-local mkdir = helpers.mkdir
describe('vim._watch', function()
before_each(function()
@@ -12,9 +11,7 @@ describe('vim._watch', function()
describe('watch', function()
it('detects file changes', function()
- local root_dir = helpers.tmpname()
- os.remove(root_dir)
- mkdir(root_dir)
+ local root_dir = vim.loop.fs_mkdtemp(vim.fs.dirname(helpers.tmpname()) .. '/nvim_XXXXXXXXXX')
local result = exec_lua(
[[
@@ -100,9 +97,7 @@ describe('vim._watch', function()
describe('poll', function()
it('detects file changes', function()
- local root_dir = helpers.tmpname()
- os.remove(root_dir)
- mkdir(root_dir)
+ local root_dir = vim.loop.fs_mkdtemp(vim.fs.dirname(helpers.tmpname()) .. '/nvim_XXXXXXXXXX')
local result = exec_lua(
[[