mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 08:32:42 +00:00
win/test: enable more :terminal tests
To deal with SIGWINCH limitations on Windows, change some resize tests to _shrink_ the screen width. ... But this didn't work, so still ignoring those tests on Windows.
This commit is contained in:
@@ -70,7 +70,6 @@ describe('terminal buffer', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('cannot be modified directly', function()
|
it('cannot be modified directly', function()
|
||||||
if helpers.pending_win32(pending) then return end
|
|
||||||
feed('<c-\\><c-n>dd')
|
feed('<c-\\><c-n>dd')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
tty ready |
|
tty ready |
|
||||||
@@ -205,7 +204,6 @@ describe('terminal buffer', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
describe('No heap-buffer-overflow when using', function()
|
describe('No heap-buffer-overflow when using', function()
|
||||||
if helpers.pending_win32(pending) then return end
|
|
||||||
local testfilename = 'Xtestfile-functional-terminal-buffers_spec'
|
local testfilename = 'Xtestfile-functional-terminal-buffers_spec'
|
||||||
|
|
||||||
before_each(function()
|
before_each(function()
|
||||||
|
|||||||
@@ -182,9 +182,7 @@ describe(':terminal (with fake shell)', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('works with gf', function()
|
it('works with gf', function()
|
||||||
if helpers.pending_win32(pending) then return end
|
|
||||||
terminal_with_fake_shell([[echo "scripts/shadacat.py"]])
|
terminal_with_fake_shell([[echo "scripts/shadacat.py"]])
|
||||||
wait()
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
ready $ echo "scripts/shadacat.py" |
|
ready $ echo "scripts/shadacat.py" |
|
||||||
|
|
|
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ local clear = helpers.clear
|
|||||||
local feed, nvim = helpers.feed, helpers.nvim
|
local feed, nvim = helpers.feed, helpers.nvim
|
||||||
local feed_command = helpers.feed_command
|
local feed_command = helpers.feed_command
|
||||||
|
|
||||||
if helpers.pending_win32(pending) then return end
|
|
||||||
|
|
||||||
describe('terminal', function()
|
describe('terminal', function()
|
||||||
local screen
|
local screen
|
||||||
|
|
||||||
@@ -25,6 +23,7 @@ describe('terminal', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('resets its size when entering terminal window', function()
|
it('resets its size when entering terminal window', function()
|
||||||
|
if helpers.pending_win32(pending) then return end
|
||||||
feed('<c-\\><c-n>')
|
feed('<c-\\><c-n>')
|
||||||
feed_command('2split')
|
feed_command('2split')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
@@ -69,31 +68,26 @@ describe('terminal', function()
|
|||||||
|
|
||||||
describe('when the screen is resized', function()
|
describe('when the screen is resized', function()
|
||||||
it('will forward a resize request to the program', function()
|
it('will forward a resize request to the program', function()
|
||||||
screen:try_resize(screen._width + 3, screen._height + 5)
|
if helpers.pending_win32(pending) then return end
|
||||||
screen:expect([[
|
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
|
||||||
tty ready |
|
screen:try_resize(screen._width - 3, screen._height - 2)
|
||||||
rows: 14, cols: 53 |
|
|
||||||
{1: } |
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
{3:-- TERMINAL --} |
|
|
||||||
]])
|
|
||||||
screen:try_resize(screen._width - 6, screen._height - 10)
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
tty ready |
|
tty ready |
|
||||||
rows: 14, cols: 53 |
|
rows: 7, cols: 47 |
|
||||||
rows: 4, cols: 47 |
|
{2: } |
|
||||||
{1: } |
|
|
|
||||||
{3:-- TERMINAL --} |
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
:^ |
|
||||||
|
]])
|
||||||
|
screen:try_resize(screen._width - 6, screen._height - 3)
|
||||||
|
screen:expect([[
|
||||||
|
tty ready |
|
||||||
|
rows: 7, cols: 47 |
|
||||||
|
rows: 4, cols: 41 |
|
||||||
|
{2: } |
|
||||||
|
:^ |
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user