refactor(test): drop deprecated exc_exec #39242

This commit is contained in:
Justin M. Keyes
2026-04-20 14:16:41 -04:00
committed by GitHub
parent faa7c15b5a
commit 4ceca862fc
77 changed files with 1009 additions and 799 deletions

View File

@@ -10,10 +10,10 @@ local Screen = require('test.functional.ui.screen')
local assert_alive = n.assert_alive
local assert_log = t.assert_log
local pcall_err = t.pcall_err
local api = n.api
local command = n.command
local clear = n.clear
local exc_exec = n.exc_exec
local eval = n.eval
local eq = t.eq
local ok = t.ok
@@ -916,11 +916,17 @@ describe('stdpath()', function()
it('failure modes', function()
clear()
eq('Vim(call):E6100: "capybara" is not a valid stdpath', exc_exec('call stdpath("capybara")'))
eq('Vim(call):E6100: "" is not a valid stdpath', exc_exec('call stdpath("")'))
eq('Vim(call):E6100: "23" is not a valid stdpath', exc_exec('call stdpath(23)'))
eq('Vim(call):E731: Using a Dictionary as a String', exc_exec('call stdpath({"eris": 23})'))
eq('Vim(call):E730: Using a List as a String', exc_exec('call stdpath([23])'))
eq(
'Vim(call):E6100: "capybara" is not a valid stdpath',
pcall_err(command, 'call stdpath("capybara")')
)
eq('Vim(call):E6100: "" is not a valid stdpath', pcall_err(command, 'call stdpath("")'))
eq('Vim(call):E6100: "23" is not a valid stdpath', pcall_err(command, 'call stdpath(23)'))
eq(
'Vim(call):E731: Using a Dictionary as a String',
pcall_err(command, 'call stdpath({"eris": 23})')
)
eq('Vim(call):E730: Using a List as a String', pcall_err(command, 'call stdpath([23])'))
end)
it('$NVIM_APPNAME', function()