aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/messages_spec.lua
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-04-04 14:24:17 +0200
committerGitHub <noreply@github.com>2025-04-04 05:24:17 -0700
commit98f5aa2564c38898d35519a1bb38dd1937c8c82e (patch)
tree3bd9385003792580091b50456e95cc2a59e0a01e /test/functional/ui/messages_spec.lua
parentb10cb0296ae299e4f97335c201ccbf8da753b2a6 (diff)
downloadrneovim-98f5aa2564c38898d35519a1bb38dd1937c8c82e.tar.gz
rneovim-98f5aa2564c38898d35519a1bb38dd1937c8c82e.tar.bz2
rneovim-98f5aa2564c38898d35519a1bb38dd1937c8c82e.zip
fix(messages): verbose message emitted without kind #33305
Problem: Successive autocmd verbose messages may be emitted without a kind. Solution: Always set the kind when preparing to emit a verbose message.
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r--test/functional/ui/messages_spec.lua46
1 files changed, 45 insertions, 1 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 94faafa9be..5b40457df9 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -372,6 +372,50 @@ describe('ui/ext_messages', function()
})
feed('<CR>')
+ exec([[
+ set verbose=9
+ augroup verbose
+ autocmd BufEnter * echoh "BufEnter"
+ autocmd BufWinEnter * bdelete
+ augroup END
+ ]])
+ feed(':edit! foo<CR>')
+ screen:expect({
+ grid = s2,
+ cmdline = { { abort = false } },
+ messages = {
+ {
+ content = { { 'Executing BufEnter Autocommands for "*"' } },
+ history = true,
+ kind = 'verbose',
+ },
+ {
+ content = { { 'autocommand echoh "BufEnter"\n' } },
+ history = true,
+ kind = 'verbose',
+ },
+ {
+ content = { { 'Executing BufWinEnter Autocommands for "*"' } },
+ history = true,
+ kind = 'verbose',
+ },
+ {
+ content = { { 'autocommand bdelete\n' } },
+ history = true,
+ kind = 'verbose',
+ },
+ {
+ content = { { 'Press ENTER or type command to continue', 6, 18 } },
+ history = false,
+ kind = 'return_prompt',
+ },
+ },
+ })
+ feed('<CR>')
+ command('autocmd! verbose')
+ command('augroup! verbose')
+ command('set verbose=0')
+
n.add_builddir_to_rtp()
feed(':help<CR>:tselect<CR>')
screen:expect({
@@ -406,7 +450,7 @@ describe('ui/ext_messages', function()
screen.messages = {}
end,
})
- feed('<CR>:bd<CR>')
+ feed('<CR>:bdelete<CR>$')
-- kind=shell for :!cmd messages
local cmd = t.is_os('win') and 'echo stdout& echo stderr>&2& exit 3'