aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-01-12 11:28:20 +0000
committerLewis Russell <lewis6991@gmail.com>2024-01-12 12:04:18 +0000
commitd33e1da9b7f7e886219cfdd20b9bbfaccdc43be9 (patch)
tree847c5c36b440434ec046b3d454581f121cc8d6c5 /test/functional/api
parent2f9ee9b6cfc61a0504fc0bc22bdf481828e2ea91 (diff)
downloadrneovim-d33e1da9b7f7e886219cfdd20b9bbfaccdc43be9.tar.gz
rneovim-d33e1da9b7f7e886219cfdd20b9bbfaccdc43be9.tar.bz2
rneovim-d33e1da9b7f7e886219cfdd20b9bbfaccdc43be9.zip
test: do not inject vim module into global helpers
Diffstat (limited to 'test/functional/api')
-rw-r--r--test/functional/api/buffer_spec.lua2
-rw-r--r--test/functional/api/command_spec.lua2
-rw-r--r--test/functional/api/proc_spec.lua2
-rw-r--r--test/functional/api/tabpage_spec.lua2
-rw-r--r--test/functional/api/vim_spec.lua14
-rw-r--r--test/functional/api/window_spec.lua2
6 files changed, 12 insertions, 12 deletions
diff --git a/test/functional/api/buffer_spec.lua b/test/functional/api/buffer_spec.lua
index e8fff7443d..0dd01b7299 100644
--- a/test/functional/api/buffer_spec.lua
+++ b/test/functional/api/buffer_spec.lua
@@ -11,7 +11,7 @@ local exc_exec = helpers.exc_exec
local exec_lua = helpers.exec_lua
local feed_command = helpers.feed_command
local insert = helpers.insert
-local NIL = helpers.NIL
+local NIL = vim.NIL
local command = helpers.command
local bufmeths = helpers.bufmeths
local feed = helpers.feed
diff --git a/test/functional/api/command_spec.lua b/test/functional/api/command_spec.lua
index e286181bce..6486b58db9 100644
--- a/test/functional/api/command_spec.lua
+++ b/test/functional/api/command_spec.lua
@@ -1,6 +1,6 @@
local helpers = require('test.functional.helpers')(after_each)
-local NIL = helpers.NIL
+local NIL = vim.NIL
local clear = helpers.clear
local command = helpers.command
local curbufmeths = helpers.curbufmeths
diff --git a/test/functional/api/proc_spec.lua b/test/functional/api/proc_spec.lua
index 4f99a69ce6..82a3968ab7 100644
--- a/test/functional/api/proc_spec.lua
+++ b/test/functional/api/proc_spec.lua
@@ -7,7 +7,7 @@ local neq = helpers.neq
local nvim_argv = helpers.nvim_argv
local request = helpers.request
local retry = helpers.retry
-local NIL = helpers.NIL
+local NIL = vim.NIL
local is_os = helpers.is_os
describe('API', function()
diff --git a/test/functional/api/tabpage_spec.lua b/test/functional/api/tabpage_spec.lua
index d6fc041e83..f661f8e38b 100644
--- a/test/functional/api/tabpage_spec.lua
+++ b/test/functional/api/tabpage_spec.lua
@@ -4,7 +4,7 @@ local clear, nvim, tabpage, curtab, eq, ok =
local curtabmeths = helpers.curtabmeths
local funcs = helpers.funcs
local request = helpers.request
-local NIL = helpers.NIL
+local NIL = vim.NIL
local pcall_err = helpers.pcall_err
local command = helpers.command
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index ce2838879b..13b80f4486 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -1,11 +1,11 @@
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
-local luv = require('luv')
+local uv = vim.uv
local fmt = string.format
local dedent = helpers.dedent
local assert_alive = helpers.assert_alive
-local NIL = helpers.NIL
+local NIL = vim.NIL
local clear, nvim, eq, neq = helpers.clear, helpers.nvim, helpers.eq, helpers.neq
local command = helpers.command
local exec = helpers.exec
@@ -15,7 +15,7 @@ local expect = helpers.expect
local funcs = helpers.funcs
local meths = helpers.meths
local matches = helpers.matches
-local pesc = helpers.pesc
+local pesc = vim.pesc
local mkdir_p = helpers.mkdir_p
local ok, nvim_async, feed = helpers.ok, helpers.nvim_async, helpers.feed
local is_os = helpers.is_os
@@ -35,7 +35,7 @@ local pcall_err = helpers.pcall_err
local format_string = helpers.format_string
local intchar2lua = helpers.intchar2lua
local mergedicts_copy = helpers.mergedicts_copy
-local endswith = helpers.endswith
+local endswith = vim.endswith
describe('API', function()
before_each(clear)
@@ -4647,7 +4647,7 @@ describe('API', function()
end, { nargs = 1 })
]])
eq(
- luv.cwd(),
+ uv.cwd(),
meths.cmd({ cmd = 'Foo', args = { '%:p:h' }, magic = { file = true } }, { output = true })
)
end)
@@ -4806,9 +4806,9 @@ describe('API', function()
eq(1, meths.get_current_buf().id)
end)
it('works with :sleep using milliseconds', function()
- local start = luv.now()
+ local start = uv.now()
meths.cmd({ cmd = 'sleep', args = { '100m' } }, {})
- ok(luv.now() - start <= 300)
+ ok(uv.now() - start <= 300)
end)
end)
it(':call with unknown function does not crash #26289', function()
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index 7e92dd6bf3..2516e96be2 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -19,7 +19,7 @@ local curwinmeths = helpers.curwinmeths
local exec = helpers.exec
local funcs = helpers.funcs
local request = helpers.request
-local NIL = helpers.NIL
+local NIL = vim.NIL
local meths = helpers.meths
local command = helpers.command
local pcall_err = helpers.pcall_err