aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/wait_spec.lua
diff options
context:
space:
mode:
authorAbdelhakeem <abdelhakeem.osama@hotmail.com>2019-08-23 14:52:18 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-09-01 21:17:14 +0200
commitb447bdb68ceda05b3181bec8572ff22ec588ee0d (patch)
tree19ab5a052ba30de80692e46b13af067cb68ff749 /test/functional/eval/wait_spec.lua
parent2d3f39c72957edbc8a2af9c04942fdcfd90f63e5 (diff)
downloadrneovim-b447bdb68ceda05b3181bec8572ff22ec588ee0d.tar.gz
rneovim-b447bdb68ceda05b3181bec8572ff22ec588ee0d.tar.bz2
rneovim-b447bdb68ceda05b3181bec8572ff22ec588ee0d.zip
fixup! eval: add wait() test
Diffstat (limited to 'test/functional/eval/wait_spec.lua')
-rw-r--r--test/functional/eval/wait_spec.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/functional/eval/wait_spec.lua b/test/functional/eval/wait_spec.lua
index c454774bbd..5bb27131f5 100644
--- a/test/functional/eval/wait_spec.lua
+++ b/test/functional/eval/wait_spec.lua
@@ -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)