mirror of
https://github.com/neovim/neovim.git
synced 2026-05-25 22:38:29 +00:00
refactor(test): drop deprecated exc_exec #39242
This commit is contained in:
@@ -3,8 +3,8 @@ local n = require('test.functional.testnvim')()
|
||||
|
||||
local eq, clear, call = t.eq, n.clear, n.call
|
||||
local command = n.command
|
||||
local exc_exec = n.exc_exec
|
||||
local matches = t.matches
|
||||
local pcall_err = t.pcall_err
|
||||
local is_os = t.is_os
|
||||
local set_shell_powershell = n.set_shell_powershell
|
||||
local eval = n.eval
|
||||
@@ -25,15 +25,18 @@ describe('exepath()', function()
|
||||
for _, input in ipairs({ 'v:null', 'v:true', 'v:false', '{}', '[]' }) do
|
||||
eq(
|
||||
'Vim(call):E1174: String required for argument 1',
|
||||
exc_exec('call exepath(' .. input .. ')')
|
||||
pcall_err(command, 'call exepath(' .. input .. ')')
|
||||
)
|
||||
end
|
||||
eq('Vim(call):E1175: Non-empty string required for argument 1', exc_exec('call exepath("")'))
|
||||
eq(
|
||||
'Vim(call):E1175: Non-empty string required for argument 1',
|
||||
pcall_err(command, 'call exepath("")')
|
||||
)
|
||||
command('let $PATH = fnamemodify("./test/functional/fixtures/bin", ":p")')
|
||||
for _, input in ipairs({ 'v:null', 'v:true', 'v:false' }) do
|
||||
eq(
|
||||
'Vim(call):E1174: String required for argument 1',
|
||||
exc_exec('call exepath(' .. input .. ')')
|
||||
pcall_err(command, 'call exepath(' .. input .. ')')
|
||||
)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user