diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-10-19 20:17:51 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-10-19 21:48:06 +0200 |
commit | 07cc231142f5810c70818007dcd720271b1c0248 (patch) | |
tree | 6527f2b82c1a279b1bb985a4fde9651f96a0d352 /test/functional/terminal | |
parent | 288f7f8558c331fadcc72e9c7391fff08d42ba36 (diff) | |
download | rneovim-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')
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/terminal/cursor_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 14 | ||||
-rw-r--r-- | test/functional/terminal/scrollback_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/terminal/window_spec.lua | 4 |
5 files changed, 15 insertions, 15 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index 6372cd935e..8e171d31aa 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -1,7 +1,7 @@ local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim -local wait = helpers.wait +local poke_eventloop = helpers.poke_eventloop local eval, feed_command, source = helpers.eval, helpers.feed_command, helpers.source local eq, neq = helpers.eq, helpers.neq local write_file = helpers.write_file @@ -13,7 +13,7 @@ describe(':terminal buffer', function() before_each(function() clear() feed_command('set modifiable swapfile undolevels=20') - wait() + poke_eventloop() screen = thelpers.screen_setup() end) diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua index ef12438ecc..8d70ebf679 100644 --- a/test/functional/terminal/cursor_spec.lua +++ b/test/functional/terminal/cursor_spec.lua @@ -70,7 +70,7 @@ describe(':terminal cursor', function() :set number | ]]) feed('i') - helpers.wait() + helpers.poke_eventloop() screen:expect([[ {7: 1 }tty ready | {7: 2 }rows: 6, cols: 46 | 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). diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index 1df8df6f6e..77fdba7fc4 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -6,7 +6,7 @@ local feed, nvim_dir, feed_command = helpers.feed, helpers.nvim_dir, helpers.fee local iswin = helpers.iswin local eval = helpers.eval local command = helpers.command -local wait = helpers.wait +local poke_eventloop = helpers.poke_eventloop local retry = helpers.retry local curbufmeths = helpers.curbufmeths local nvim = helpers.nvim @@ -347,7 +347,7 @@ describe(':terminal prints more lines than the screen height and exits', functio local screen = Screen.new(30, 7) screen:attach({rgb=false}) feed_command('call termopen(["'..nvim_dir..'/tty-test", "10"]) | startinsert') - wait() + poke_eventloop() screen:expect([[ line6 | line7 | @@ -423,7 +423,7 @@ describe("'scrollback' option", function() retry(nil, nil, function() expect_lines(33, 2) end) curbufmeths.set_option('scrollback', 10) - wait() + poke_eventloop() retry(nil, nil, function() expect_lines(16) end) curbufmeths.set_option('scrollback', 10000) retry(nil, nil, function() expect_lines(16) end) diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua index f1c828d17e..9f278fd157 100644 --- a/test/functional/terminal/window_spec.lua +++ b/test/functional/terminal/window_spec.lua @@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') local feed_data = thelpers.feed_data local feed, clear = helpers.feed, helpers.clear -local wait = helpers.wait +local poke_eventloop = helpers.poke_eventloop local iswin = helpers.iswin local command = helpers.command local retry = helpers.retry @@ -127,7 +127,7 @@ describe(':terminal window', function() it('wont show any folds', function() feed([[<C-\><C-N>ggvGzf]]) - wait() + poke_eventloop() screen:expect([[ ^tty ready | line1 | |