mirror of
https://github.com/neovim/neovim.git
synced 2026-04-19 14:00:49 +00:00
fixup! eval: add wait() test
This commit is contained in:
@@ -64,18 +64,15 @@ describe('wait()', function()
|
||||
nvim('set_var', 'counter', 0)
|
||||
eq(0, call('wait', 1000, 'Count() >= 5', 5))
|
||||
eq(5, nvim('get_var', 'counter'))
|
||||
|
||||
nvim('set_var', 'counter', 0)
|
||||
eq(0, call('wait', 1000, 'Count() >= 5', 0))
|
||||
eq(5, nvim('get_var', 'counter'))
|
||||
end)
|
||||
|
||||
it('errors out on invalid timeout value', function()
|
||||
expect_err('E475: Invalid argument', call, 'wait', '', 1)
|
||||
expect_err('Invalid value for argument', call, 'wait', '', 1)
|
||||
end)
|
||||
|
||||
it('errors out on invalid interval', function()
|
||||
expect_err('E475: Invalid argument', call, 'wait', 0, 1, -1)
|
||||
expect_err('E475: Invalid argument', call, 'wait', 0, 1, '')
|
||||
expect_err('Invalid value for argument', call, 'wait', 0, 1, -1)
|
||||
expect_err('Invalid value for argument', call, 'wait', 0, 1, 0)
|
||||
expect_err('Invalid value for argument', call, 'wait', 0, 1, '')
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user