mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
test: reduce flakiness in highlight tests (#32488)
This commit is contained in:
@@ -221,30 +221,25 @@ describe("'number' and 'relativenumber'", function()
|
|||||||
func Func(timer)
|
func Func(timer)
|
||||||
call cursor(1, 1)
|
call cursor(1, 1)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
call timer_start(300, 'Func')
|
|
||||||
]])
|
]])
|
||||||
screen:expect({
|
screen:expect([[
|
||||||
grid = [[
|
|
||||||
{8: 3 }aaaaa |
|
{8: 3 }aaaaa |
|
||||||
{8: 2 }bbbbb |
|
{8: 2 }bbbbb |
|
||||||
{8: 1 }ccccc |
|
{8: 1 }ccccc |
|
||||||
{8: 0 }^ddddd |
|
{8: 0 }^ddddd |
|
||||||
{1:~ }|*3
|
{1:~ }|*3
|
||||||
|
|
|
|
||||||
]],
|
]])
|
||||||
timeout = 100,
|
command([[call timer_start(300, 'Func')]])
|
||||||
})
|
screen:expect_unchanged(false, 100)
|
||||||
screen:expect({
|
screen:expect([[
|
||||||
grid = [[
|
|
||||||
{8: 0 }^aaaaa |
|
{8: 0 }^aaaaa |
|
||||||
{8: 1 }bbbbb |
|
{8: 1 }bbbbb |
|
||||||
{8: 2 }ccccc |
|
{8: 2 }ccccc |
|
||||||
{8: 3 }ddddd |
|
{8: 3 }ddddd |
|
||||||
{1:~ }|*3
|
{1:~ }|*3
|
||||||
|
|
|
|
||||||
]],
|
]])
|
||||||
})
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- oldtest: Test_number_insert_delete_lines()
|
-- oldtest: Test_number_insert_delete_lines()
|
||||||
|
@@ -1159,30 +1159,25 @@ describe('CursorLine and CursorLineNr highlights', function()
|
|||||||
func Func(timer)
|
func Func(timer)
|
||||||
call cursor(2, 1)
|
call cursor(2, 1)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
call timer_start(300, 'Func')
|
|
||||||
]])
|
]])
|
||||||
screen:expect({
|
screen:expect([[
|
||||||
grid = [[
|
|
||||||
aaaaa |
|
aaaaa |
|
||||||
bbbbb |
|
bbbbb |
|
||||||
ccccc |
|
ccccc |
|
||||||
{21:^ddddd }|
|
{21:^ddddd }|
|
||||||
{1:~ }|*3
|
{1:~ }|*3
|
||||||
|
|
|
|
||||||
]],
|
]])
|
||||||
timeout = 100,
|
command([[call timer_start(300, 'Func')]])
|
||||||
})
|
screen:expect_unchanged(false, 100)
|
||||||
screen:expect({
|
screen:expect([[
|
||||||
grid = [[
|
|
||||||
aaaaa |
|
aaaaa |
|
||||||
{21:^bbbbb }|
|
{21:^bbbbb }|
|
||||||
ccccc |
|
ccccc |
|
||||||
ddddd |
|
ddddd |
|
||||||
{1:~ }|*3
|
{1:~ }|*3
|
||||||
|
|
|
|
||||||
]],
|
]])
|
||||||
})
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('with split windows in diff mode', function()
|
it('with split windows in diff mode', function()
|
||||||
@@ -1337,30 +1332,25 @@ describe('CursorColumn highlight', function()
|
|||||||
func Func(timer)
|
func Func(timer)
|
||||||
call cursor(1, 1)
|
call cursor(1, 1)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
call timer_start(300, 'Func')
|
|
||||||
]])
|
]])
|
||||||
screen:expect({
|
screen:expect([[
|
||||||
grid = [[
|
|
||||||
aaaa{21:a} |
|
aaaa{21:a} |
|
||||||
bbbb{21:b} |
|
bbbb{21:b} |
|
||||||
cccc{21:c} |
|
cccc{21:c} |
|
||||||
dddd^d |
|
dddd^d |
|
||||||
{1:~ }|*3
|
{1:~ }|*3
|
||||||
|
|
|
|
||||||
]],
|
]])
|
||||||
timeout = 100,
|
command([[call timer_start(300, 'Func')]])
|
||||||
})
|
screen:expect_unchanged(false, 100)
|
||||||
screen:expect({
|
screen:expect([[
|
||||||
grid = [[
|
|
||||||
^aaaaa |
|
^aaaaa |
|
||||||
{21:b}bbbb |
|
{21:b}bbbb |
|
||||||
{21:c}cccc |
|
{21:c}cccc |
|
||||||
{21:d}dddd |
|
{21:d}dddd |
|
||||||
{1:~ }|*3
|
{1:~ }|*3
|
||||||
|
|
|
|
||||||
]],
|
]])
|
||||||
})
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('is not shown on current line with virtualedit', function()
|
it('is not shown on current line with virtualedit', function()
|
||||||
|
Reference in New Issue
Block a user