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.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 5882758b5a..0f30910450 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -392,7 +392,14 @@ end
-- sleeps the test runner (_not_ the nvim instance)
local function sleep(ms)
- run(nil, nil, nil, ms)
+ local function notification_cb(method, _)
+ if method == "redraw" then
+ error("Screen is attached; use screen:sleep() instead.")
+ end
+ return true
+ end
+
+ run(nil, notification_cb, nil, ms)
end
local function curbuf_contents()