test(lua/hl_spec): reduce flakiness (#32489)

This commit is contained in:
zeertzjq
2025-02-17 10:32:35 +08:00
committed by GitHub
parent bfd59c955f
commit 5e7801329f

View File

@@ -27,6 +27,14 @@ describe('vim.hl.range', function()
'口口=口口',
'zxcvbnm',
})
screen:expect([[
^asdfghjkl{1:$} |
«口=口»{1:$} |
qwertyuiop{1:$} |
口口=口口{1:$} |
zxcvbnm{1:$} |
|
]])
end)
it('works with charwise selection', function()
@@ -106,7 +114,7 @@ describe('vim.hl.range', function()
end)
it('removes highlight after given `timeout`', function()
local timeout = 100
local timeout = 300
exec_lua(function()
local ns = vim.api.nvim_create_namespace('')
vim.hl.range(0, ns, 'Search', { 0, 0 }, { 4, 0 }, { timeout = timeout })
@@ -120,7 +128,7 @@ describe('vim.hl.range', function()
zxcvbnm{1:$} |
|
]],
timeout = timeout,
timeout = timeout / 3,
})
screen:expect([[
^asdfghjkl{1:$} |