aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 5882758b5a..84e81c5af4 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -392,7 +392,16 @@ end
-- sleeps the test runner (_not_ the nvim instance)
local function sleep(ms)
- run(nil, nil, nil, ms)
+ local function notification_cb(method, args)
+ local _ = args
+ if method == "redraw" then
+ error("helpers.sleep() called while screen is attached. "..
+ "Use screen:sleep(...) instead")
+ end
+ return true
+ end
+
+ run(nil, notification_cb, nil, ms)
end
local function curbuf_contents()