mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Make existing tests work with new feature
This commit is contained in:
@@ -51,87 +51,4 @@ describe('terminal', function()
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('split horizontally', function()
|
||||
before_each(function()
|
||||
nvim('command', 'sp')
|
||||
end)
|
||||
|
||||
local function reduce_height()
|
||||
screen:expect([[
|
||||
tty ready |
|
||||
rows: 3, cols: 50 |
|
||||
{1: } |
|
||||
~ |
|
||||
========== |
|
||||
tty ready |
|
||||
rows: 3, cols: 50 |
|
||||
{2: } |
|
||||
========== |
|
||||
-- TERMINAL -- |
|
||||
]])
|
||||
end
|
||||
|
||||
it('uses the minimum height of all window displaying it', reduce_height)
|
||||
|
||||
describe('and then vertically', function()
|
||||
before_each(function()
|
||||
reduce_height()
|
||||
nvim('command', 'vsp')
|
||||
end)
|
||||
|
||||
local function reduce_width()
|
||||
screen:expect([[
|
||||
rows: 3, cols: 50 |rows: 3, cols: 50 |
|
||||
rows: 3, cols: 24 |rows: 3, cols: 24 |
|
||||
{1: } |{2: } |
|
||||
~ |~ |
|
||||
========== ========== |
|
||||
rows: 3, cols: 50 |
|
||||
rows: 3, cols: 24 |
|
||||
{2: } |
|
||||
========== |
|
||||
-- TERMINAL -- |
|
||||
]])
|
||||
feed('<c-\\><c-n>gg')
|
||||
screen:expect([[
|
||||
^tty ready |rows: 3, cols: 50 |
|
||||
rows: 3, cols: 50 |rows: 3, cols: 24 |
|
||||
rows: 3, cols: 24 |{2: } |
|
||||
{2: } |~ |
|
||||
========== ========== |
|
||||
rows: 3, cols: 50 |
|
||||
rows: 3, cols: 24 |
|
||||
{2: } |
|
||||
========== |
|
||||
|
|
||||
]])
|
||||
end
|
||||
|
||||
it('uses the minimum width of all window displaying it', reduce_width)
|
||||
|
||||
describe('and then closes one of the vertical splits with q:', function()
|
||||
before_each(function()
|
||||
reduce_width()
|
||||
nvim('command', 'q')
|
||||
feed('<c-w>ja')
|
||||
end)
|
||||
|
||||
it('will restore the width', function()
|
||||
screen:expect([[
|
||||
rows: 3, cols: 24 |
|
||||
rows: 3, cols: 50 |
|
||||
{2: } |
|
||||
~ |
|
||||
========== |
|
||||
rows: 3, cols: 24 |
|
||||
rows: 3, cols: 50 |
|
||||
{1: } |
|
||||
========== |
|
||||
-- TERMINAL -- |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user