mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
fix(test): typing
This commit is contained in:

committed by
Lewis Russell

parent
3fd8292aaf
commit
a7bbda121d
@@ -15,7 +15,8 @@ local ok = global_helpers.ok
|
||||
local sleep = uv.sleep
|
||||
local fail = global_helpers.fail
|
||||
|
||||
local module = {}
|
||||
--- @class test.functional.helpers: test.helpers
|
||||
local module = vim.deepcopy(global_helpers)
|
||||
|
||||
local runtime_set = 'set runtimepath^=./build/lib/nvim/'
|
||||
module.nvim_prog = (os.getenv('NVIM_PRG') or global_helpers.paths.test_build_dir .. '/bin/nvim')
|
||||
@@ -367,13 +368,6 @@ function module.feed(...)
|
||||
end
|
||||
end
|
||||
|
||||
--- @param ... string
|
||||
function module.rawfeed(...)
|
||||
for _, v in ipairs({ ... }) do
|
||||
nvim_feed(dedent(v))
|
||||
end
|
||||
end
|
||||
|
||||
---@param ... string[]?
|
||||
---@return string[]
|
||||
function module.merge_args(...)
|
||||
@@ -583,7 +577,7 @@ function module.insert(...)
|
||||
nvim_feed('i')
|
||||
for _, v in ipairs({ ... }) do
|
||||
local escaped = v:gsub('<', '<lt>')
|
||||
module.rawfeed(escaped)
|
||||
module.feed(escaped)
|
||||
end
|
||||
nvim_feed('<ESC>')
|
||||
end
|
||||
@@ -853,7 +847,7 @@ function module.exc_exec(cmd)
|
||||
end
|
||||
|
||||
--- @param cond boolean
|
||||
--- @param reason string
|
||||
--- @param reason? string
|
||||
--- @return boolean
|
||||
function module.skip(cond, reason)
|
||||
if cond then
|
||||
@@ -1028,9 +1022,6 @@ function module.mkdir_p(path)
|
||||
return os.execute((is_os('win') and 'mkdir ' .. path or 'mkdir -p ' .. path))
|
||||
end
|
||||
|
||||
--- @class test.functional.helpers: test.helpers
|
||||
module = vim.tbl_extend('error', module, global_helpers)
|
||||
|
||||
--- @return test.functional.helpers
|
||||
return function(after_each)
|
||||
if after_each then
|
||||
|
Reference in New Issue
Block a user