aboutsummaryrefslogtreecommitdiff
path: root/test/functional/normal/put_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/normal/put_spec.lua')
-rw-r--r--test/functional/normal/put_spec.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/functional/normal/put_spec.lua b/test/functional/normal/put_spec.lua
index 148a35ec6b..29cef13e39 100644
--- a/test/functional/normal/put_spec.lua
+++ b/test/functional/normal/put_spec.lua
@@ -874,20 +874,23 @@ describe('put command', function()
local function bell_test(actions, should_ring)
local screen = Screen.new()
screen:attach()
+ if should_ring then
+ -- check bell is not set by nvim before the action
+ screen:sleep(50)
+ end
helpers.ok(not screen.bell and not screen.visualbell)
actions()
- helpers.wait()
- screen:wait(function()
+ screen:expect{condition=function()
if should_ring then
if not screen.bell and not screen.visualbell then
- return 'Bell was not rung after action'
+ error('Bell was not rung after action')
end
else
if screen.bell or screen.visualbell then
- return 'Bell was rung after action'
+ error('Bell was rung after action')
end
end
- end)
+ end, unchanged=(not should_ring)}
screen:detach()
end