test(core/job_spec): fix flakiness (#26623)

This commit is contained in:
zeertzjq 2023-12-18 07:09:32 +08:00 committed by GitHub
parent d82a586a9e
commit 75b8f4c8cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 80 deletions

View File

@ -1154,17 +1154,26 @@ describe('jobs', function()
]])
local screen = thelpers.setup_child_nvim({
'--cmd', 'set notermguicolors',
'-i', 'NONE',
'-u', filename,
'+q'
})
-- Wait for startup to complete, so that all terminal responses are received.
screen:expect([[
{1: } |
~ |*3
{1:[No Name] 0,0-1 All}|
|
{3:-- TERMINAL --} |
]])
screen:expect{grid=[[
feed(':q<CR>')
screen:expect([[
|
[Process exited 0]{1: } |
|*4
{3:-- TERMINAL --} |
]]}
]])
end)
end)

View File

@ -1431,8 +1431,7 @@ describe('builtin popupmenu', function()
feed('<C-N>')
screen:expect([[
1info |
{1:~ }|
{1:~ }|
{1:~ }|*2
{3:[Scratch] [Preview] }|
one^ |
{s:one }{1: }|
@ -1497,28 +1496,11 @@ describe('builtin popupmenu', function()
if multigrid then
screen:expect{grid=[[
## grid 1
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|*10
[3:------------------------------]|
## grid 2
one^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*9
## grid 3
{2:-- }{5:match 1 of 3} |
## grid 4
@ -1538,12 +1520,7 @@ describe('builtin popupmenu', function()
{s:one }{n:1info}{1: }|
{n:two }{1: }|
{n:three }{1: }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
{2:-- }{5:match 1 of 3} |
]], unchanged = true}
end
@ -1554,28 +1531,11 @@ describe('builtin popupmenu', function()
if multigrid then
screen:expect{grid=[[
## grid 1
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|*10
[3:------------------------------]|
## grid 2
three^ |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*9
## grid 3
{2:-- }{5:match 3 of 3} |
## grid 4
@ -1595,12 +1555,7 @@ describe('builtin popupmenu', function()
{n:one 3info}{1: }|
{n:two }{1: }|
{s:three }{1: }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
{2:-- }{5:match 3 of 3} |
]]}
end
@ -1615,28 +1570,11 @@ describe('builtin popupmenu', function()
if multigrid then
screen:expect{grid=[[
## grid 1
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|*10
[3:------------------------------]|
## grid 2
itesttesttesttesttesone^t |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*9
## grid 3
{2:-- }{5:match 1 of 3} |
## grid 5
@ -1659,12 +1597,7 @@ describe('builtin popupmenu', function()
{1:~}{n:1info}{1: }{s: one }{1: }|
{1:~}{n: }{1: }{n: two }{1: }|
{1:~ }{n: three }{1: }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*6
{2:-- }{5:match 1 of 3} |
]]}
end