aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/popupmenu_spec.lua36
-rw-r--r--test/old/testdir/test_popup.vim5
2 files changed, 41 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index 7469269a1b..d82c24bb83 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -5621,6 +5621,42 @@ describe('builtin popupmenu', function()
]])
end
feed('<Esc>3Gdd"zp')
+
+ screen:try_resize(32, 10)
+ feed('GA<C-X><C-N>')
+ if multigrid then
+ screen:expect({
+ grid = [[
+ ## grid 1
+ [2:--------------------------------]|*9
+ [3:--------------------------------]|
+ ## grid 2
+ 123456789_123456789_123456789_a |
+ 123456789_123456789_123456789_b |
+ 123456789_123456789_|
+ 123456789_a^ |
+ {1:~ }|*5
+ ## grid 3
+ {2:-- }{5:match 1 of 2} |
+ ## grid 4
+ {s: 12345...}|
+ {n: 12345...}|
+ ]],
+ float_pos = { [4] = { -1, 'NW', 2, 4, 11, false, 100 } },
+ })
+ else
+ screen:expect([[
+ 123456789_123456789_123456789_a |
+ 123456789_123456789_123456789_b |
+ 123456789_123456789_|
+ 123456789_a^ |
+ {1:~ }{s: 12345...}{1: }|
+ {1:~ }{n: 12345...}{1: }|
+ {1:~ }|*3
+ {2:-- }{5:match 1 of 2} |
+ ]])
+ end
+ feed('<Esc>3Gdd"zp')
end)
-- oldtest: Test_pum_maxwidth_multibyte()
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim
index 631a81d5cc..94e437ee93 100644
--- a/test/old/testdir/test_popup.vim
+++ b/test/old/testdir/test_popup.vim
@@ -2023,6 +2023,11 @@ func Test_pum_maxwidth()
call VerifyScreenDump(buf, 'Test_pum_maxwidth_04', {'rows': 8})
call term_sendkeys(buf, "\<Esc>3Gdd\"zp")
+ call term_sendkeys(buf, ":set lines=10 columns=32\<CR>")
+ call term_sendkeys(buf, "GA\<C-N>")
+ call VerifyScreenDump(buf, 'Test_pum_maxwidth_09', {'rows': 10, 'cols': 32})
+ call term_sendkeys(buf, "\<Esc>3Gdd\"zp")
+
call StopVimInTerminal(buf)
endfunc