diff options
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 9bb683f25f..154374cda9 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -2,7 +2,7 @@ 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 nvim_dir, source, eq = helpers.nvim_dir, helpers.source, helpers.eq -local execute, eval = helpers.execute, helpers.eval +local feed_command, eval = helpers.feed_command, helpers.eval if helpers.pending_win32(pending) then return end @@ -23,11 +23,11 @@ describe(':terminal', function() echomsg "msg3" ]]) -- Invoke a command that emits frequent terminal activity. - execute([[terminal while true; do echo X; done]]) + feed_command([[terminal while true; do echo X; done]]) helpers.feed([[<C-\><C-N>]]) wait() helpers.sleep(10) -- Let some terminal activity happen. - execute("messages") + feed_command("messages") screen:expect([[ msg1 | msg2 | @@ -37,14 +37,14 @@ describe(':terminal', function() end) it("in normal-mode :split does not move cursor", function() - execute([[terminal while true; do echo foo; sleep .1; done]]) + feed_command([[terminal while true; do echo foo; sleep .1; done]]) helpers.feed([[<C-\><C-N>M]]) -- move cursor away from last line wait() eq(3, eval("line('$')")) -- window height eq(2, eval("line('.')")) -- cursor is in the middle - execute('vsplit') + feed_command('vsplit') eq(2, eval("line('.')")) -- cursor stays where we put it - execute('split') + feed_command('split') eq(2, eval("line('.')")) -- cursor stays where we put it end) @@ -65,7 +65,7 @@ describe(':terminal (with fake shell)', function() -- Invokes `:terminal {cmd}` using a fake shell (shell-test.c) which prints -- the {cmd} and exits immediately . local function terminal_with_fake_shell(cmd) - execute("terminal "..(cmd and cmd or "")) + feed_command("terminal "..(cmd and cmd or "")) end it('with no argument, acts like termopen()', function() @@ -157,7 +157,7 @@ describe(':terminal (with fake shell)', function() end) it('works with findfile()', function() - execute('terminal') + feed_command('terminal') eq('term://', string.match(eval('bufname("%")'), "^term://")) eq('scripts/shadacat.py', eval('findfile("scripts/shadacat.py", ".")')) end) @@ -173,7 +173,7 @@ describe(':terminal (with fake shell)', function() ]]) eq('term://', string.match(eval('bufname("%")'), "^term://")) helpers.feed([[<C-\><C-N>]]) - execute([[find */shadacat.py]]) + feed_command([[find */shadacat.py]]) eq('scripts/shadacat.py', eval('bufname("%")')) end) |