aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/ex_cmds/ctrl_c_spec.lua2
-rw-r--r--test/functional/helpers.lua11
-rw-r--r--test/functional/terminal/ex_terminal_spec.lua2
3 files changed, 12 insertions, 3 deletions
diff --git a/test/functional/ex_cmds/ctrl_c_spec.lua b/test/functional/ex_cmds/ctrl_c_spec.lua
index 993bfa0dba..091a008814 100644
--- a/test/functional/ex_cmds/ctrl_c_spec.lua
+++ b/test/functional/ex_cmds/ctrl_c_spec.lua
@@ -41,7 +41,7 @@ describe("CTRL-C (mapped)", function()
local function test_ctrl_c(ms)
feed(":global/^/p<CR>")
- helpers.sleep(ms)
+ screen:sleep(ms)
feed("<C-C>")
screen:expect([[Interrupt]], nil, nil, nil, true)
end
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()
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua
index 1ed63adcfb..be0fd9f8ff 100644
--- a/test/functional/terminal/ex_terminal_spec.lua
+++ b/test/functional/terminal/ex_terminal_spec.lua
@@ -26,7 +26,7 @@ describe(':terminal', function()
feed_command([[terminal while true; do echo X; done]])
helpers.feed([[<C-\><C-N>]])
wait()
- screen.sleep(10) -- Let some terminal activity happen.
+ screen:sleep(10) -- Let some terminal activity happen.
feed_command("messages")
screen:expect([[
msg1 |