diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2017-04-21 10:59:06 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2017-04-21 14:21:26 +0200 |
commit | 48f0542ad6f923443ab4bba858aae2d9558f8d76 (patch) | |
tree | 3a27c8826e6e05be56696aaae126f7940e71fa36 /test/functional/helpers.lua | |
parent | 9cc97896813fa4f40a4e37b6f72284cdb10c4195 (diff) | |
download | rneovim-48f0542ad6f923443ab4bba858aae2d9558f8d76.tar.gz rneovim-48f0542ad6f923443ab4bba858aae2d9558f8d76.tar.bz2 rneovim-48f0542ad6f923443ab4bba858aae2d9558f8d76.zip |
tests: detect invalid helpers.sleep
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 11 |
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() |