fixup! eval: add wait() test

This commit is contained in:
Abdelhakeem
2019-08-23 14:52:18 +02:00
committed by Björn Linse
parent 2d3f39c729
commit b447bdb68c
2 changed files with 9 additions and 18 deletions

View File

@@ -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)