test: remove remaining use of feed_command() in terminal/ (#38069)

Also deduplicate screen lines in some other tests.
This commit is contained in:
zeertzjq
2026-02-26 10:06:34 +08:00
committed by GitHub
parent 1fe1b2525f
commit e86ccdbeae
12 changed files with 55 additions and 91 deletions

View File

@@ -5,7 +5,6 @@ local tt = require('test.functional.testterm')
local assert_alive = n.assert_alive
local clear = n.clear
local feed = n.feed
local feed_command = n.feed_command
local command = n.command
local eq = t.eq
local eval = n.eval
@@ -42,29 +41,27 @@ describe(':terminal', function()
it('does not change size on WinEnter', function()
feed('<c-\\><c-n>')
feed('k')
feed_command('2split')
command('2split')
screen:expect([[
^tty ready |
rows: 5, cols: 50 |
========== |
tty ready |
rows: 5, cols: 50 |
|
|*2
|*3
========== |
:2split |
|
]])
feed_command('wincmd p')
command('wincmd p')
screen:expect([[
tty ready |
rows: 5, cols: 50 |
========== |
^tty ready |
rows: 5, cols: 50 |
|
|*2
|*3
========== |
:wincmd p |
|
]])
end)
@@ -102,8 +99,7 @@ describe(':terminal', function()
screen:expect([[
tty ready |
rows: 7, cols: 47 |
|
|*3
|*4
^ |
|
]])