aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/messages_spec.lua
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2024-12-19 15:24:48 +0100
committerGitHub <noreply@github.com>2024-12-19 06:24:48 -0800
commit31d6885deba01fe0e7262dca58c94220c2fe32fc (patch)
tree8ac191d85495192f2e54e73c9b0515afed43f2ab /test/functional/ui/messages_spec.lua
parent02bc40c19401ea9f7529cbc81bd18bd01c39bb3c (diff)
downloadrneovim-31d6885deba01fe0e7262dca58c94220c2fe32fc.tar.gz
rneovim-31d6885deba01fe0e7262dca58c94220c2fe32fc.tar.bz2
rneovim-31d6885deba01fe0e7262dca58c94220c2fe32fc.zip
fix(messages): better formatting for :highlight with ext_messages #31627
Also avoid going down message callstack with empty message, and remove expected grid for some tests where it did not change, and we are just testing for expected messages.
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r--test/functional/ui/messages_spec.lua35
1 files changed, 9 insertions, 26 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 287db81a12..6d8c6609c8 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -84,11 +84,6 @@ describe('ui/ext_messages', function()
}
feed('<cr><cr>')
screen:expect {
- grid = [[
- line 1 |
- line ^2 |
- {1:~ }|*3
- ]],
messages = {
{
content = { { '\ntest\n[O]k: ', 6, 10 } },
@@ -160,11 +155,6 @@ describe('ui/ext_messages', function()
-- kind=emsg after :throw
feed(':throw "foo"<cr>')
screen:expect {
- grid = [[
- l^ine 1 |
- line 2 |
- {1:~ }|*3
- ]],
messages = {
{
content = { { 'Error detected while processing :', 9, 6 } },
@@ -214,27 +204,20 @@ describe('ui/ext_messages', function()
})
-- highlight
- feed(':hi ErrorMsg<cr>')
+ feed(':filter character highlight<CR>')
screen:expect({
- grid = [[
- ^line 1 |
- line 2 |
- {1:~ }|*3
- ]],
messages = {
{
content = {
- { '\nErrorMsg ' },
- { 'xxx', 9, 6 },
+ { '\n@character ' },
+ { 'xxx', 26, 150 },
+ { ' ' },
+ { 'links to', 18, 5 },
+ { ' Character\n@character.special ' },
+ { 'xxx', 16, 151 },
{ ' ' },
- { 'ctermfg=', 18, 5 },
- { '15 ' },
- { 'ctermbg=', 18, 5 },
- { '1 ' },
- { 'guifg=', 18, 5 },
- { 'White ' },
- { 'guibg=', 18, 5 },
- { 'Red' },
+ { 'links to', 18, 5 },
+ { ' SpecialChar' },
},
kind = 'list_cmd',
},