vim-patch:8.2.0382: some tests fail when run under valgrind (#21936)

Problem:    Some tests fail when run under valgrind.
Solution:   Increase timeouts.

353c351bd2

Cherry-pick Test_pum_with_preview_win() from patch 8.2.0011.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-01-21 20:50:46 +08:00
committed by GitHub
parent fb805bb8b7
commit 0f52e2c849
5 changed files with 91 additions and 3 deletions

View File

@@ -1044,6 +1044,7 @@ describe('builtin popupmenu', function()
[5] = {bold = true, foreground = Screen.colors.SeaGreen},
[6] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
[7] = {background = Screen.colors.Yellow}, -- Search
[8] = {foreground = Screen.colors.Red},
})
end)
@@ -1191,6 +1192,66 @@ describe('builtin popupmenu', function()
]])
end)
-- oldtest: Test_pum_with_preview_win()
it('preview window opened during completion', function()
exec([[
funct Omni_test(findstart, base)
if a:findstart
return col(".") - 1
endif
return [#{word: "one", info: "1info"}, #{word: "two", info: "2info"}, #{word: "three", info: "3info"}]
endfunc
set omnifunc=Omni_test
set completeopt+=longest
]])
feed('Gi<C-X><C-O>')
screen:expect([[
^ |
{n:one }{1: }|
{n:two }{1: }|
{n:three }{1: }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{2:-- }{8:Back at original} |
]])
feed('<C-N>')
screen:expect([[
1info |
|
{1:~ }|
{3:[Scratch] [Preview] }|
one^ |
{s:one }{1: }|
{n:two }{1: }|
{n:three }{1: }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{4:[No Name] [+] }|
{2:-- }{5:match 1 of 3} |
]])
end)
it('with vsplits', function()
insert('aaa aab aac\n')
feed(':vsplit<cr>')