mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 15:51:32 +00:00
tests: detect invalid helpers.sleep
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user