mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
test(lua/hl_spec): reduce flakiness (#32489)
This commit is contained in:
@@ -27,6 +27,14 @@ describe('vim.hl.range', function()
|
|||||||
'口口=口口',
|
'口口=口口',
|
||||||
'zxcvbnm',
|
'zxcvbnm',
|
||||||
})
|
})
|
||||||
|
screen:expect([[
|
||||||
|
^asdfghjkl{1:$} |
|
||||||
|
«口=口»{1:$} |
|
||||||
|
qwertyuiop{1:$} |
|
||||||
|
口口=口口{1:$} |
|
||||||
|
zxcvbnm{1:$} |
|
||||||
|
|
|
||||||
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('works with charwise selection', function()
|
it('works with charwise selection', function()
|
||||||
@@ -106,7 +114,7 @@ describe('vim.hl.range', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('removes highlight after given `timeout`', function()
|
it('removes highlight after given `timeout`', function()
|
||||||
local timeout = 100
|
local timeout = 300
|
||||||
exec_lua(function()
|
exec_lua(function()
|
||||||
local ns = vim.api.nvim_create_namespace('')
|
local ns = vim.api.nvim_create_namespace('')
|
||||||
vim.hl.range(0, ns, 'Search', { 0, 0 }, { 4, 0 }, { timeout = timeout })
|
vim.hl.range(0, ns, 'Search', { 0, 0 }, { 4, 0 }, { timeout = timeout })
|
||||||
@@ -120,7 +128,7 @@ describe('vim.hl.range', function()
|
|||||||
zxcvbnm{1:$} |
|
zxcvbnm{1:$} |
|
||||||
|
|
|
|
||||||
]],
|
]],
|
||||||
timeout = timeout,
|
timeout = timeout / 3,
|
||||||
})
|
})
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^asdfghjkl{1:$} |
|
^asdfghjkl{1:$} |
|
||||||
|
Reference in New Issue
Block a user