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.lua28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/functional/lua/watch_spec.lua b/test/functional/lua/watch_spec.lua
index 115fee8091..bd8faadf5b 100644
--- a/test/functional/lua/watch_spec.lua
+++ b/test/functional/lua/watch_spec.lua
@@ -1,15 +1,17 @@
-local helpers = require('test.functional.helpers')(after_each)
-local eq = helpers.eq
-local exec_lua = helpers.exec_lua
-local clear = helpers.clear
-local is_ci = helpers.is_ci
-local is_os = helpers.is_os
-local skip = helpers.skip
+local t = require('test.testutil')
+local n = require('test.functional.testnvim')()
+
+local eq = t.eq
+local exec_lua = n.exec_lua
+local clear = n.clear
+local is_ci = t.is_ci
+local is_os = t.is_os
+local skip = t.skip
-- Create a file via a rename to avoid multiple
-- events which can happen with some backends on some platforms
local function touch(path)
- local tmp = helpers.tmpname()
+ local tmp = t.tmpname()
io.open(tmp, 'w'):close()
assert(vim.uv.fs_rename(tmp, path))
end
@@ -22,15 +24,13 @@ describe('vim._watch', function()
local function run(watchfunc)
it('detects file changes (watchfunc=' .. watchfunc .. '())', function()
if watchfunc == 'fswatch' then
- skip(is_os('mac'), 'flaky test on mac')
- skip(
- not is_ci() and helpers.fn.executable('fswatch') == 0,
- 'fswatch not installed and not on CI'
- )
skip(is_os('win'), 'not supported on windows')
+ skip(is_os('mac'), 'flaky test on mac')
+ skip(not is_ci() and n.fn.executable('fswatch') == 0, 'fswatch not installed and not on CI')
end
if watchfunc == 'watch' then
+ skip(is_os('mac'), 'flaky test on mac')
skip(is_os('bsd'), 'Stopped working on bsd after 3ca967387c49c754561c3b11a574797504d40f38')
else
skip(
@@ -39,7 +39,7 @@ describe('vim._watch', function()
)
end
- local root_dir = vim.uv.fs_mkdtemp(vim.fs.dirname(helpers.tmpname()) .. '/nvim_XXXXXXXXXX')
+ local root_dir = vim.uv.fs_mkdtemp(vim.fs.dirname(t.tmpname()) .. '/nvim_XXXXXXXXXX')
local expected_events = 0