test(ui/inccommand_spec): don't check for transient message (#37078)

The check for v:errmsg is enough.

(cherry picked from commit c374d78095)
This commit is contained in:
zeertzjq
2025-12-23 08:15:32 +08:00
committed by github-actions[bot]
parent 6338d2d54b
commit fcdc984188

View File

@@ -11,7 +11,7 @@ local feed = n.feed
local insert = n.insert
local fn = n.fn
local api = n.api
local neq = t.neq
local matches = t.matches
local ok = t.ok
local retry = t.retry
local source = n.source
@@ -1633,12 +1633,12 @@ describe("'inccommand' and :cnoremap", function()
refresh(case, true)
command("cnoremap <expr> x execute('bwipeout!')[-1].'x'")
feed(':%s/tw/tox<enter>')
screen:expect { any = [[{9:^E565:]] }
feed('<c-c>')
api.nvim_set_vvar('errmsg', '')
feed(':%s/tw/tox')
-- error thrown b/c of the mapping
neq(nil, eval('v:errmsg'):find('^E565:'))
matches('^E565:', api.nvim_get_vvar('errmsg'))
feed('<enter>')
expect([[
Inc substitution on
toxo lines