aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/errorlist_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-04-20 14:16:41 -0400
committerGitHub <noreply@github.com>2026-04-20 14:16:41 -0400
commit4ceca862fceb021049144a9aed05c60ae39b7aba (patch)
treeb7b1f1e421aeeaa2d30a348745c17f9f9b69b8d7 /test/functional/vimscript/errorlist_spec.lua
parentfaa7c15b5a711435ed9d90f7fbf2a2ff8f1255c7 (diff)
downloadrneovim-4ceca862fceb021049144a9aed05c60ae39b7aba.tar.gz
rneovim-4ceca862fceb021049144a9aed05c60ae39b7aba.tar.bz2
rneovim-4ceca862fceb021049144a9aed05c60ae39b7aba.zip
refactor(test): drop deprecated exc_exec #39242
Diffstat (limited to 'test/functional/vimscript/errorlist_spec.lua')
-rw-r--r--test/functional/vimscript/errorlist_spec.lua28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/functional/vimscript/errorlist_spec.lua b/test/functional/vimscript/errorlist_spec.lua
index ef9111f788..267a200b87 100644
--- a/test/functional/vimscript/errorlist_spec.lua
+++ b/test/functional/vimscript/errorlist_spec.lua
@@ -4,7 +4,7 @@ local n = require('test.functional.testnvim')()
local clear = n.clear
local command = n.command
local eq = t.eq
-local exc_exec = n.exc_exec
+local pcall_err = t.pcall_err
local get_win_var = n.api.nvim_win_get_var
describe('setqflist()', function()
@@ -13,15 +13,15 @@ describe('setqflist()', function()
before_each(clear)
it('requires a list for {list}', function()
- eq('Vim(call):E714: List required', exc_exec('call setqflist("foo")'))
- eq('Vim(call):E714: List required', exc_exec('call setqflist(5)'))
- eq('Vim(call):E714: List required', exc_exec('call setqflist({})'))
+ eq('Vim(call):E714: List required', pcall_err(command, 'call setqflist("foo")'))
+ eq('Vim(call):E714: List required', pcall_err(command, 'call setqflist(5)'))
+ eq('Vim(call):E714: List required', pcall_err(command, 'call setqflist({})'))
end)
it('requires a string for {action}', function()
- eq('Vim(call):E928: String required', exc_exec('call setqflist([], 5)'))
- eq('Vim(call):E928: String required', exc_exec('call setqflist([], [])'))
- eq('Vim(call):E928: String required', exc_exec('call setqflist([], {})'))
+ eq('Vim(call):E928: String required', pcall_err(command, 'call setqflist([], 5)'))
+ eq('Vim(call):E928: String required', pcall_err(command, 'call setqflist([], [])'))
+ eq('Vim(call):E928: String required', pcall_err(command, 'call setqflist([], {})'))
end)
it('sets w:quickfix_title', function()
@@ -41,7 +41,7 @@ describe('setqflist()', function()
it('requires a dict for {what}', function()
eq(
'Vim(call):E715: Dictionary required',
- exc_exec('call setqflist([], "r", function("function"))')
+ pcall_err(command, 'call setqflist([], "r", function("function"))')
)
end)
end)
@@ -52,15 +52,15 @@ describe('setloclist()', function()
before_each(clear)
it('requires a list for {list}', function()
- eq('Vim(call):E714: List required', exc_exec('call setloclist(0, "foo")'))
- eq('Vim(call):E714: List required', exc_exec('call setloclist(0, 5)'))
- eq('Vim(call):E714: List required', exc_exec('call setloclist(0, {})'))
+ eq('Vim(call):E714: List required', pcall_err(command, 'call setloclist(0, "foo")'))
+ eq('Vim(call):E714: List required', pcall_err(command, 'call setloclist(0, 5)'))
+ eq('Vim(call):E714: List required', pcall_err(command, 'call setloclist(0, {})'))
end)
it('requires a string for {action}', function()
- eq('Vim(call):E928: String required', exc_exec('call setloclist(0, [], 5)'))
- eq('Vim(call):E928: String required', exc_exec('call setloclist(0, [], [])'))
- eq('Vim(call):E928: String required', exc_exec('call setloclist(0, [], {})'))
+ eq('Vim(call):E928: String required', pcall_err(command, 'call setloclist(0, [], 5)'))
+ eq('Vim(call):E928: String required', pcall_err(command, 'call setloclist(0, [], [])'))
+ eq('Vim(call):E928: String required', pcall_err(command, 'call setloclist(0, [], {})'))
end)
it('sets w:quickfix_title for the correct window', function()