tests: fix new loaders-test for nvim0.7 and 0.9, fix flakiness.

This commit is contained in:
L3MON4D3 2024-04-21 11:08:53 +02:00
parent 000074c50b
commit c071d3c6da
2 changed files with 18 additions and 3 deletions

View file

@ -131,9 +131,10 @@ describe("loaders:", function()
screen:expect({
grid = [[
all1^ |
{0:~ }|*3
{2:-- INSERT --} |]],
})
{0:~ }|
{0:~ }|
{0:~ }|
{2:-- INSERT --} |]]})
end)
it("Can lazy-load from multiple sources", function()
@ -864,6 +865,7 @@ describe("loaders:", function()
-- double as quick test for package.jsonc
ls_helpers.scratch_edit("snippets/package.jsonc")
exec_lua("vim.wait(100, function() end)")
feed(
[[i{ "name": "snippets", "contributes": { "snippets": [{"language": ["all"], "path": "./all.json"}] } }]]

View file

@ -183,7 +183,9 @@ describe("session", function()
{2:-- INSERT --} |]],
})
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
screen:expect({
@ -1378,10 +1380,15 @@ describe("session", function()
expand()
-- jump to one before jumping out of child-snippet.
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
screen:expect({
@ -1627,8 +1634,11 @@ describe("session", function()
-- check connectivity.
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
screen:expect({
grid = [[
/** |
@ -2001,8 +2011,11 @@ describe("session", function()
feed("o<Cr><Cr><Cr><Esc>kkifn")
expand()
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
feed("int a")
screen:expect({
grid = [[