diff options
author | Jakob Schnitzer <mail@jakobschnitzer.de> | 2017-04-24 11:35:10 +0200 |
---|---|---|
committer | Jakob Schnitzer <mail@jakobschnitzer.de> | 2017-04-24 11:35:10 +0200 |
commit | ff8b2eb435c518f0eafd0e509afe1f5ee4a81fd1 (patch) | |
tree | 526b1df09b06121bdbc6ef5254ef53821958a6cb /test/functional/terminal | |
parent | 4049492b6d7b8805686b14dbacb3b729abd03308 (diff) | |
parent | 7f6d3d305269fd1139bc2aec9a91bf98ad595199 (diff) | |
download | rneovim-ff8b2eb435c518f0eafd0e509afe1f5ee4a81fd1.tar.gz rneovim-ff8b2eb435c518f0eafd0e509afe1f5ee4a81fd1.tar.bz2 rneovim-ff8b2eb435c518f0eafd0e509afe1f5ee4a81fd1.zip |
Merge branch 'master' into option-fixes
Diffstat (limited to 'test/functional/terminal')
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 30 | ||||
-rw-r--r-- | test/functional/terminal/cursor_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/terminal/edit_spec.lua | 5 | ||||
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 20 | ||||
-rw-r--r-- | test/functional/terminal/helpers.lua | 8 | ||||
-rw-r--r-- | test/functional/terminal/highlight_spec.lua | 18 | ||||
-rw-r--r-- | test/functional/terminal/scrollback_spec.lua | 13 | ||||
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 114 | ||||
-rw-r--r-- | test/functional/terminal/window_split_tab_spec.lua | 8 |
9 files changed, 119 insertions, 103 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index 129390a7a5..48b8512bf0 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -2,7 +2,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 eval, execute, source = helpers.eval, helpers.execute, helpers.source +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() - execute('set modifiable swapfile undolevels=20') + feed_command('set modifiable swapfile undolevels=20') wait() screen = thelpers.screen_setup() end) @@ -86,7 +86,7 @@ describe('terminal buffer', function() it('sends data to the terminal when the "put" operator is used', function() feed('<c-\\><c-n>gg"ayj') - execute('let @a = "appended " . @a') + feed_command('let @a = "appended " . @a') feed('"ap"ap') screen:expect([[ ^tty ready | @@ -112,8 +112,8 @@ describe('terminal buffer', function() it('sends data to the terminal when the ":put" command is used', function() feed('<c-\\><c-n>gg"ayj') - execute('let @a = "appended " . @a') - execute('put a') + feed_command('let @a = "appended " . @a') + feed_command('put a') screen:expect([[ ^tty ready | appended tty ready | @@ -124,7 +124,7 @@ describe('terminal buffer', function() :put a | ]]) -- line argument is only used to move the cursor - execute('6put a') + feed_command('6put a') screen:expect([[ tty ready | appended tty ready | @@ -147,7 +147,7 @@ describe('terminal buffer', function() {4:~ }| :bd! | ]]) - execute('bnext') + feed_command('bnext') screen:expect([[ ^ | {4:~ }| @@ -162,7 +162,7 @@ describe('terminal buffer', function() it('handles loss of focus gracefully', function() -- Change the statusline to avoid printing the file name, which varies. nvim('set_option', 'statusline', '==========') - execute('set laststatus=0') + feed_command('set laststatus=0') -- Save the buffer number of the terminal for later testing. local tbuf = eval('bufnr("%")') @@ -191,16 +191,16 @@ describe('terminal buffer', function() ]]) neq(tbuf, eval('bufnr("%")')) - execute('quit!') -- Should exit the new window, not the terminal. + feed_command('quit!') -- Should exit the new window, not the terminal. eq(tbuf, eval('bufnr("%")')) - execute('set laststatus=1') -- Restore laststatus to the default. + feed_command('set laststatus=1') -- Restore laststatus to the default. end) it('term_close() use-after-free #4393', function() - execute('terminal yes') + feed_command('terminal yes') feed([[<C-\><C-n>]]) - execute('bdelete!') + feed_command('bdelete!') end) end) @@ -217,12 +217,12 @@ describe('No heap-buffer-overflow when using', function() end) it('termopen(echo) #3161', function() - execute('edit ' .. testfilename) + feed_command('edit ' .. testfilename) -- Move cursor away from the beginning of the line feed('$') -- Let termopen() modify the buffer - execute('call termopen("echo")') + feed_command('call termopen("echo")') wait() - execute('bdelete!') + feed_command('bdelete!') end) end) diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua index 84f14585fa..84d0322f12 100644 --- a/test/functional/terminal/cursor_spec.lua +++ b/test/functional/terminal/cursor_spec.lua @@ -2,7 +2,8 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local thelpers = require('test.functional.terminal.helpers') local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim -local nvim_dir, execute = helpers.nvim_dir, helpers.execute +local nvim_dir, command = helpers.nvim_dir, helpers.command +local feed_command = helpers.feed_command local hide_cursor = thelpers.hide_cursor local show_cursor = thelpers.show_cursor @@ -138,7 +139,8 @@ describe('cursor with customized highlighting', function() [3] = {bold = true}, }) screen:attach({rgb=false}) - execute('call termopen(["'..nvim_dir..'/tty-test"]) | startinsert') + command('call termopen(["'..nvim_dir..'/tty-test"])') + feed_command('startinsert') end) it('overrides the default highlighting', function() diff --git a/test/functional/terminal/edit_spec.lua b/test/functional/terminal/edit_spec.lua index 42a5c768bb..d2b2d8a60c 100644 --- a/test/functional/terminal/edit_spec.lua +++ b/test/functional/terminal/edit_spec.lua @@ -45,11 +45,8 @@ describe(':edit term://*', function() local bufcontents = {} local winheight = curwinmeths.get_height() local buf_cont_start = rep_size - sb - winheight + 2 - local function bufline (i) - return ('%d: foobar'):format(i) - end for i = buf_cont_start,(rep_size - 1) do - bufcontents[#bufcontents + 1] = bufline(i) + bufcontents[#bufcontents + 1] = ('%d: foobar'):format(i) end bufcontents[#bufcontents + 1] = '' bufcontents[#bufcontents + 1] = '[Process exited 0]' diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 9bb683f25f..be0fd9f8ff 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") + screen:sleep(10) -- Let some terminal activity happen. + 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) diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua index 934c01e3bf..3b04d17705 100644 --- a/test/functional/terminal/helpers.lua +++ b/test/functional/terminal/helpers.lua @@ -1,7 +1,7 @@ local helpers = require('test.functional.helpers')(nil) local Screen = require('test.functional.ui.screen') local nvim_dir = helpers.nvim_dir -local execute, nvim = helpers.execute, helpers.nvim +local feed_command, nvim = helpers.feed_command, helpers.nvim local function feed_data(data) nvim('set_var', 'term_data', data) @@ -58,15 +58,15 @@ local function screen_setup(extra_rows, command, cols) screen:attach({rgb=false}) - execute('enew | call termopen('..command..')') + feed_command('enew | call termopen('..command..')') nvim('input', '<CR>') local vim_errmsg = nvim('eval', 'v:errmsg') if vim_errmsg and "" ~= vim_errmsg then error(vim_errmsg) end - execute('setlocal scrollback=10') - execute('startinsert') + feed_command('setlocal scrollback=10') + feed_command('startinsert') -- tty-test puts the terminal into raw mode and echoes input. Tests work by -- feeding termcodes to control the display and asserting by screen:expect. diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua index 0fe463401e..bb40770235 100644 --- a/test/functional/terminal/highlight_spec.lua +++ b/test/functional/terminal/highlight_spec.lua @@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local thelpers = require('test.functional.terminal.helpers') local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim -local nvim_dir, execute = helpers.nvim_dir, helpers.execute +local nvim_dir, command = helpers.nvim_dir, helpers.command local eq, eval = helpers.eq, helpers.eval if helpers.pending_win32(pending) then return end @@ -27,7 +27,8 @@ describe('terminal window highlighting', function() [11] = {background = 11}, }) screen:attach({rgb=false}) - execute('enew | call termopen(["'..nvim_dir..'/tty-test"]) | startinsert') + command('enew | call termopen(["'..nvim_dir..'/tty-test"])') + feed('i') screen:expect([[ tty ready | {10: } | @@ -130,7 +131,8 @@ describe('terminal window highlighting with custom palette', function() }) screen:attach({rgb=true}) nvim('set_var', 'terminal_color_3', '#123456') - execute('enew | call termopen(["'..nvim_dir..'/tty-test"]) | startinsert') + command('enew | call termopen(["'..nvim_dir..'/tty-test"])') + feed('i') screen:expect([[ tty ready | {7: } | @@ -164,9 +166,9 @@ describe('synIDattr()', function() before_each(function() clear() screen = Screen.new(50, 7) - execute('highlight Normal ctermfg=252 guifg=#ff0000 guibg=Black') + command('highlight Normal ctermfg=252 guifg=#ff0000 guibg=Black') -- Salmon #fa8072 Maroon #800000 - execute('highlight Keyword ctermfg=79 guifg=Salmon guisp=Maroon') + command('highlight Keyword ctermfg=79 guifg=Salmon guisp=Maroon') end) it('returns cterm-color if RGB-capable UI is _not_ attached', function() @@ -213,8 +215,8 @@ describe('fg/bg special colors', function() before_each(function() clear() screen = Screen.new(50, 7) - execute('highlight Normal ctermfg=145 ctermbg=16 guifg=#ff0000 guibg=Black') - execute('highlight Visual ctermfg=bg ctermbg=fg guifg=bg guibg=fg guisp=bg') + command('highlight Normal ctermfg=145 ctermbg=16 guifg=#ff0000 guibg=Black') + command('highlight Visual ctermfg=bg ctermbg=fg guifg=bg guibg=fg guisp=bg') end) it('resolve to "Normal" values', function() @@ -251,7 +253,7 @@ describe('fg/bg special colors', function() screen:attach({rgb=true}) local new_guibg = '#282c34' local new_guifg = '#abb2bf' - execute('highlight Normal guifg='..new_guifg..' guibg='..new_guibg) + command('highlight Normal guifg='..new_guifg..' guibg='..new_guibg) eq(new_guibg, eval('synIDattr(hlID("Visual"), "fg#")')) eq(new_guifg, eval('synIDattr(hlID("Visual"), "bg#")')) eq(new_guibg, eval('synIDattr(hlID("Visual"), "sp#")')) diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index 4ead288a19..05f81295c2 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -2,7 +2,7 @@ local Screen = require('test.functional.ui.screen') local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') local clear, eq, curbuf = helpers.clear, helpers.eq, helpers.curbuf -local feed, nvim_dir, execute = helpers.feed, helpers.nvim_dir, helpers.execute +local feed, nvim_dir, feed_command = helpers.feed, helpers.nvim_dir, helpers.feed_command local eval = helpers.eval local command = helpers.command local wait = helpers.wait @@ -339,7 +339,7 @@ describe('terminal prints more lines than the screen height and exits', function clear() local screen = Screen.new(30, 7) screen:attach({rgb=false}) - execute('call termopen(["'..nvim_dir..'/tty-test", "10"]) | startinsert') + feed_command('call termopen(["'..nvim_dir..'/tty-test", "10"]) | startinsert') wait() screen:expect([[ line6 | @@ -451,7 +451,14 @@ describe("'scrollback' option", function() it(':setlocal in a normal buffer is an error', function() command('new') - execute('setlocal scrollback=42') + + -- :setlocal to -1 is NOT an error. + feed_command('setlocal scrollback=-1') + eq(nil, string.match(eval("v:errmsg"), "E%d*:")) + feed('<CR>') + + -- :setlocal to anything except -1 is an error. + feed_command('setlocal scrollback=42') feed('<CR>') eq('E474:', string.match(eval("v:errmsg"), "E%d*:")) eq(-1, curbufmeths.get_option('scrollback')) diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 90051b8cd5..b14bceecdd 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -2,9 +2,10 @@ -- as a simple way to send keys and assert screen state. local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') -local feed = thelpers.feed_data -local execute = helpers.execute +local feed_data = thelpers.feed_data +local feed_command = helpers.feed_command local nvim_dir = helpers.nvim_dir +local retry = helpers.retry if helpers.pending_win32(pending) then return end @@ -34,7 +35,7 @@ describe('tui', function() end) it('accepts basic utf-8 input', function() - feed('iabc\ntest1\ntest2') + feed_data('iabc\ntest1\ntest2') screen:expect([[ abc | test1 | @@ -44,7 +45,7 @@ describe('tui', function() {3:-- INSERT --} | {3:-- TERMINAL --} | ]]) - feed('\027') + feed_data('\027') screen:expect([[ abc | test1 | @@ -59,8 +60,8 @@ describe('tui', function() it('interprets leading <Esc> byte as ALT modifier in normal-mode', function() local keys = 'dfghjkl' for c in keys:gmatch('.') do - execute('nnoremap <a-'..c..'> ialt-'..c..'<cr><esc>') - feed('\027'..c) + feed_command('nnoremap <a-'..c..'> ialt-'..c..'<cr><esc>') + feed_data('\027'..c) end screen:expect([[ alt-j | @@ -71,7 +72,7 @@ describe('tui', function() | {3:-- TERMINAL --} | ]]) - feed('gg') + feed_data('gg') screen:expect([[ {1:a}lt-d | alt-f | @@ -90,7 +91,7 @@ describe('tui', function() -- Example: for input ALT+j: -- * Vim (Nvim prior to #3982) sets high-bit, inserts "ê". -- * Nvim (after #3982) inserts "j". - feed('i\027j') + feed_data('i\027j') screen:expect([[ j{1: } | {4:~ }| @@ -103,10 +104,10 @@ describe('tui', function() end) it('accepts ascii control sequences', function() - feed('i') - feed('\022\007') -- ctrl+g - feed('\022\022') -- ctrl+v - feed('\022\013') -- ctrl+m + feed_data('i') + feed_data('\022\007') -- ctrl+g + feed_data('\022\022') -- ctrl+v + feed_data('\022\013') -- ctrl+m screen:expect([[ {9:^G^V^M}{1: } | {4:~ }| @@ -119,7 +120,7 @@ describe('tui', function() end) it('automatically sends <Paste> for bracketed paste sequences', function() - feed('i\027[200~') + feed_data('i\027[200~') screen:expect([[ {1: } | {4:~ }| @@ -129,7 +130,7 @@ describe('tui', function() {3:-- INSERT (paste) --} | {3:-- TERMINAL --} | ]]) - feed('pasted from terminal') + feed_data('pasted from terminal') screen:expect([[ pasted from terminal{1: } | {4:~ }| @@ -139,7 +140,7 @@ describe('tui', function() {3:-- INSERT (paste) --} | {3:-- TERMINAL --} | ]]) - feed('\027[201~') + feed_data('\027[201~') screen:expect([[ pasted from terminal{1: } | {4:~ }| @@ -152,12 +153,12 @@ describe('tui', function() end) it('can handle arbitrarily long bursts of input', function() - execute('set ruler') + feed_command('set ruler') local t = {} for i = 1, 3000 do t[i] = 'item ' .. tostring(i) end - feed('i\027[200~'..table.concat(t, '\n')..'\027[201~') + feed_data('i\027[200~'..table.concat(t, '\n')..'\027[201~') screen:expect([[ item 2997 | item 2998 | @@ -180,7 +181,7 @@ describe('tui with non-tty file descriptors', function() it('can handle pipes as stdout and stderr', function() local screen = thelpers.screen_setup(0, '"'..helpers.nvim_prog ..' -u NONE -i NONE --cmd \'set noswapfile noshowcmd noruler\' --cmd \'normal iabc\' > /dev/null 2>&1 && cat testF && rm testF"') - feed(':w testF\n:q\n') + feed_data(':w testF\n:q\n') screen:expect([[ :w testF | :q | @@ -200,12 +201,13 @@ describe('tui focus event handling', function() helpers.clear() screen = thelpers.screen_setup(0, '["'..helpers.nvim_prog ..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile noshowcmd noruler"]') - execute('autocmd FocusGained * echo "gained"') - execute('autocmd FocusLost * echo "lost"') + feed_data(":autocmd FocusGained * echo 'gained'\n") + feed_data(":autocmd FocusLost * echo 'lost'\n") + feed_data("\034\016") -- CTRL-\ CTRL-N end) it('can handle focus events in normal mode', function() - feed('\027[I') + feed_data('\027[I') screen:expect([[ {1: } | {4:~ }| @@ -216,7 +218,7 @@ describe('tui focus event handling', function() {3:-- TERMINAL --} | ]]) - feed('\027[O') + feed_data('\027[O') screen:expect([[ {1: } | {4:~ }| @@ -229,9 +231,9 @@ describe('tui focus event handling', function() end) it('can handle focus events in insert mode', function() - execute('set noshowmode') - feed('i') - feed('\027[I') + feed_command('set noshowmode') + feed_data('i') + feed_data('\027[I') screen:expect([[ {1: } | {4:~ }| @@ -241,7 +243,7 @@ describe('tui focus event handling', function() gained | {3:-- TERMINAL --} | ]]) - feed('\027[O') + feed_data('\027[O') screen:expect([[ {1: } | {4:~ }| @@ -254,8 +256,8 @@ describe('tui focus event handling', function() end) it('can handle focus events in cmdline mode', function() - feed(':') - feed('\027[I') + feed_data(':') + feed_data('\027[I') screen:expect([[ | {4:~ }| @@ -265,7 +267,7 @@ describe('tui focus event handling', function() g{1:a}ined | {3:-- TERMINAL --} | ]]) - feed('\027[O') + feed_data('\027[O') screen:expect([[ | {4:~ }| @@ -278,30 +280,36 @@ describe('tui focus event handling', function() end) it('can handle focus events in terminal mode', function() - execute('set shell='..nvim_dir..'/shell-test') - execute('set laststatus=0') - execute('set noshowmode') - execute('terminal') - feed('\027[I') - screen:expect([[ - ready $ | - [Process exited 0]{1: } | - | - | - | - gained | - {3:-- TERMINAL --} | - ]]) - feed('\027[O') - screen:expect([[ - ready $ | - [Process exited 0]{1: } | - | - | - | - lost | - {3:-- TERMINAL --} | - ]]) + feed_data(':set shell='..nvim_dir..'/shell-test\n') + feed_data(':set noshowmode laststatus=0\n') + + retry(2, 3 * screen.timeout, function() + feed_data(':terminal\n') + feed_data('\027[I') + screen:expect([[ + ready $ | + [Process exited 0]{1: } | + | + | + | + gained | + {3:-- TERMINAL --} | + ]]) + feed_data('\027[O') + screen:expect([[ + ready $ | + [Process exited 0]{1: } | + | + | + | + lost | + {3:-- TERMINAL --} | + ]]) + + -- If retry is needed... + feed_data("\034\016") -- CTRL-\ CTRL-N + feed_data(':bwipeout!\n') + end) end) end) diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua index d3386a641e..4867e0d9fa 100644 --- a/test/functional/terminal/window_split_tab_spec.lua +++ b/test/functional/terminal/window_split_tab_spec.lua @@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') local clear = helpers.clear local feed, nvim = helpers.feed, helpers.nvim -local execute = helpers.execute +local feed_command = helpers.feed_command if helpers.pending_win32(pending) then return end @@ -26,7 +26,7 @@ describe('terminal', function() it('resets its size when entering terminal window', function() feed('<c-\\><c-n>') - execute('2split') + feed_command('2split') screen:expect([[ rows: 2, cols: 50 | {2:^ } | @@ -39,7 +39,7 @@ describe('terminal', function() ========== | :2split | ]]) - execute('wincmd p') + feed_command('wincmd p') screen:expect([[ tty ready | rows: 2, cols: 50 | @@ -52,7 +52,7 @@ describe('terminal', function() ========== | :wincmd p | ]]) - execute('wincmd p') + feed_command('wincmd p') screen:expect([[ rows: 2, cols: 50 | {2:^ } | |