mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test(lua/hl_spec): set timeout for transient state (#32169)
This commit is contained in:
parent
af0ef2ac9d
commit
fd55c7df6f
@ -106,19 +106,22 @@ describe('vim.hl.range', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('removes highlight after given `timeout`', function()
|
it('removes highlight after given `timeout`', function()
|
||||||
local timeout = 50
|
local timeout = 100
|
||||||
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 })
|
||||||
end)
|
end)
|
||||||
screen:expect([[
|
screen:expect({
|
||||||
|
grid = [[
|
||||||
{10:^asdfghjkl}{100:$} |
|
{10:^asdfghjkl}{100:$} |
|
||||||
{10:«口=口»}{100:$} |
|
{10:«口=口»}{100:$} |
|
||||||
{10:qwertyuiop}{100:$} |
|
{10:qwertyuiop}{100:$} |
|
||||||
{10:口口=口口}{1:$} |
|
{10:口口=口口}{1:$} |
|
||||||
zxcvbnm{1:$} |
|
zxcvbnm{1:$} |
|
||||||
|
|
|
|
||||||
]])
|
]],
|
||||||
|
timeout = timeout,
|
||||||
|
})
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^asdfghjkl{1:$} |
|
^asdfghjkl{1:$} |
|
||||||
«口=口»{1:$} |
|
«口=口»{1:$} |
|
||||||
|
Loading…
Reference in New Issue
Block a user