backport: refactor(test): drop deprecated exc_exec #39255

This commit is contained in:
Justin M. Keyes
2026-04-21 12:22:05 -04:00
committed by GitHub
parent 26bcffda6c
commit e767b4843b
84 changed files with 1101 additions and 810 deletions

View File

@@ -3,10 +3,10 @@ local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local eq = t.eq
local pcall_err = t.pcall_err
local clear = n.clear
local fn = n.fn
local command = n.command
local exc_exec = n.exc_exec
before_each(clear)
@@ -87,15 +87,15 @@ describe('matchaddpos()', function()
command('hi clear PreProc')
eq(
'Vim(let):E5030: Empty list at position 0',
exc_exec('let val = matchaddpos("PreProc", [[]])')
pcall_err(command, 'let val = matchaddpos("PreProc", [[]])')
)
eq(
'Vim(let):E5030: Empty list at position 1',
exc_exec('let val = matchaddpos("PreProc", [1, v:_null_list])')
pcall_err(command, 'let val = matchaddpos("PreProc", [1, v:_null_list])')
)
eq(
'Vim(let):E5031: List or number required at position 1',
exc_exec('let val = matchaddpos("PreProc", [1, v:_null_dict])')
pcall_err(command, 'let val = matchaddpos("PreProc", [1, v:_null_dict])')
)
end)
it('works with 0 lnum', function()