mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
tests: improve robustness of immediate successes in screen tests
This commit is contained in:
@@ -20,15 +20,15 @@ describe("update_menu notification", function()
|
||||
end)
|
||||
|
||||
local function expect_sent(expected)
|
||||
screen:wait(function()
|
||||
screen:expect{condition=function()
|
||||
if screen.update_menu ~= expected then
|
||||
if expected then
|
||||
return 'update_menu was expected but not sent'
|
||||
error('update_menu was expected but not sent')
|
||||
else
|
||||
return 'update_menu was sent unexpectedly'
|
||||
error('update_menu was sent unexpectedly')
|
||||
end
|
||||
end
|
||||
end)
|
||||
end, unchanged=(not expected)}
|
||||
end
|
||||
|
||||
it("should be sent when adding a menu", function()
|
||||
|
Reference in New Issue
Block a user