aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/ex_terminal_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-10-19 20:17:51 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2020-10-19 21:48:06 +0200
commit07cc231142f5810c70818007dcd720271b1c0248 (patch)
tree6527f2b82c1a279b1bb985a4fde9651f96a0d352 /test/functional/terminal/ex_terminal_spec.lua
parent288f7f8558c331fadcc72e9c7391fff08d42ba36 (diff)
downloadrneovim-07cc231142f5810c70818007dcd720271b1c0248.tar.gz
rneovim-07cc231142f5810c70818007dcd720271b1c0248.tar.bz2
rneovim-07cc231142f5810c70818007dcd720271b1c0248.zip
A Mudholland Dr. Recast
The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r--test/functional/terminal/ex_terminal_spec.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua
index 138befd978..4b512605e1 100644
--- a/test/functional/terminal/ex_terminal_spec.lua
+++ b/test/functional/terminal/ex_terminal_spec.lua
@@ -1,6 +1,6 @@
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
-local clear, wait, nvim = helpers.clear, helpers.wait, helpers.nvim
+local clear, poke_eventloop, nvim = helpers.clear, helpers.poke_eventloop, helpers.nvim
local nvim_dir, source, eq = helpers.nvim_dir, helpers.source, helpers.eq
local feed = helpers.feed
local feed_command, eval = helpers.feed_command, helpers.eval
@@ -29,7 +29,7 @@ describe(':terminal', function()
-- Invoke a command that emits frequent terminal activity.
feed([[:terminal "]]..nvim_dir..[[/shell-test" REP 9999 !terminal_output!<cr>]])
feed([[<C-\><C-N>]])
- wait()
+ poke_eventloop()
-- Wait for some terminal activity.
retry(nil, 4000, function()
ok(funcs.line('$') > 6)
@@ -60,7 +60,7 @@ describe(':terminal', function()
feed_command([[terminal while true; do echo foo; sleep .1; done]])
end
feed([[<C-\><C-N>M]]) -- move cursor away from last line
- wait()
+ poke_eventloop()
eq(3, eval("line('$')")) -- window height
eq(2, eval("line('.')")) -- cursor is in the middle
feed_command('vsplit')
@@ -76,11 +76,11 @@ describe(':terminal', function()
-- Create a new line (in the shell). For a normal buffer this
-- increments the jumplist; for a terminal-buffer it should not. #3723
feed('i')
- wait()
+ poke_eventloop()
feed('<CR><CR><CR><CR>')
- wait()
+ poke_eventloop()
feed([[<C-\><C-N>]])
- wait()
+ poke_eventloop()
-- Wait for >=1 lines to be created.
retry(nil, 4000, function()
ok(funcs.line('$') > lines_before)
@@ -210,7 +210,7 @@ describe(':terminal (with fake shell)', function()
it('ignores writes if the backing stream closes', function()
terminal_with_fake_shell()
feed('iiXXXXXXX')
- wait()
+ poke_eventloop()
-- Race: Though the shell exited (and streams were closed by SIGCHLD
-- handler), :terminal cleanup is pending on the main-loop.
-- This write should be ignored (not crash, #5445).