aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/legacy/messages_spec.lua48
-rw-r--r--test/functional/terminal/tui_spec.lua2
2 files changed, 49 insertions, 1 deletions
diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua
index 794676153c..0a4d418e9c 100644
--- a/test/functional/legacy/messages_spec.lua
+++ b/test/functional/legacy/messages_spec.lua
@@ -49,6 +49,54 @@ describe('messages', function()
]])
end)
+ -- oldtest: Test_message_not_cleared_after_mode()
+ it('clearing mode does not remove message', function()
+ screen = Screen.new(60, 10)
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ })
+ screen:attach()
+ exec([[
+ nmap <silent> gx :call DebugSilent('normal')<CR>
+ vmap <silent> gx :call DebugSilent('visual')<CR>
+ function DebugSilent(arg)
+ echomsg "from DebugSilent" a:arg
+ endfunction
+ set showmode
+ set cmdheight=1
+ call setline(1, ['one', 'two', 'three'])
+ ]])
+
+ feed('gx')
+ screen:expect([[
+ ^one |
+ two |
+ three |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ from DebugSilent normal |
+ ]])
+
+ -- removing the mode message used to also clear the intended message
+ feed('vEgx')
+ screen:expect([[
+ ^one |
+ two |
+ three |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ from DebugSilent visual |
+ ]])
+ end)
+
describe('more prompt', function()
before_each(function()
command('set more')
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 7723b6c7e7..b1836f2e4d 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -2475,7 +2475,7 @@ describe("TUI as a client", function()
-- grid smaller than containing terminal window is cleared properly
feed_data(":call setline(1,['a'->repeat(&columns)]->repeat(&lines))\n")
- feed_data("0:set lines=2\n")
+ feed_data("0:set lines=3\n")
screen_server:expect{grid=[[
{1:a}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
{5:[No Name] [+] }|