diff options
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 4770c5e143..a6577f3ca0 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1571,6 +1571,48 @@ stack traceback: end, }) end) + + it('g< mapping shows recent messages', function() + command('echo "foo" | echo "bar"') + local s1 = [[ + ^ | + {1:~ }|*4 + ]] + screen:expect({ + grid = s1, + messages = { + { + content = { { 'bar' } }, + history = false, + kind = 'echo', + }, + }, + }) + feed(':messages<CR>g<lt>') + screen:expect({ + grid = [[ + ^ | + {1:~ }|*4 + ]], + messages = { + { + content = { { 'Press ENTER or type command to continue', 6, 18 } }, + history = false, + kind = 'return_prompt', + }, + }, + msg_history = { + { + content = { { 'foo' } }, + kind = 'echo', + }, + { + content = { { 'bar' } }, + kind = 'echo', + }, + }, + }) + end) end) describe('ui/builtin messages', function() |