aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/window_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/terminal/window_spec.lua')
-rw-r--r--test/functional/terminal/window_spec.lua68
1 files changed, 17 insertions, 51 deletions
diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua
index 39fc2c2562..3781933cad 100644
--- a/test/functional/terminal/window_spec.lua
+++ b/test/functional/terminal/window_spec.lua
@@ -22,13 +22,15 @@ describe(':terminal window', function()
skip(is_os('win'))
-- Test has hardcoded assumptions of dimensions.
eq(7, eval('&lines'))
- feed_data('\n\n\n') -- Add blank lines.
+ feed_data('\n\n\n') -- Add blank lines.
-- Terminal/shell contents must exceed the height of this window.
command('topleft 1split')
eq('terminal', eval('&buftype'))
feed([[i<cr>]])
-- Check topline _while_ in terminal-mode.
- retry(nil, nil, function() eq(6, eval('winsaveview()["topline"]')) end)
+ retry(nil, nil, function()
+ eq(6, eval('winsaveview()["topline"]'))
+ end)
end)
describe("with 'number'", function()
@@ -121,11 +123,7 @@ describe(':terminal window', function()
screen:expect([[
tty ready |
{2:^ } |
- |
- |
- |
- |
- |
+ |*5
]])
feed(':set colorcolumn=20<CR>i')
end)
@@ -134,10 +132,7 @@ describe(':terminal window', function()
screen:expect([[
tty ready |
{1: } |
- |
- |
- |
- |
+ |*4
{3:-- TERMINAL --} |
]])
end)
@@ -146,7 +141,7 @@ describe(':terminal window', function()
describe('with fold set', function()
before_each(function()
feed([[<C-\><C-N>:set foldenable foldmethod=manual<CR>i]])
- feed_data({'line1', 'line2', 'line3', 'line4', ''})
+ feed_data({ 'line1', 'line2', 'line3', 'line4', '' })
screen:expect([[
tty ready |
line1 |
@@ -179,54 +174,35 @@ describe(':terminal with multigrid', function()
before_each(function()
clear()
- screen = thelpers.screen_setup(0,nil,50,{ext_multigrid=true})
+ screen = thelpers.screen_setup(0, nil, 50, nil, { ext_multigrid = true })
end)
it('resizes to requested size', function()
screen:expect([[
## grid 1
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
+ [2:--------------------------------------------------]|*6
[3:--------------------------------------------------]|
## grid 2
tty ready |
{1: } |
- |
- |
- |
- |
+ |*4
## grid 3
{3:-- TERMINAL --} |
]])
screen:try_resize_grid(2, 20, 10)
if is_os('win') then
- screen:expect{any="rows: 10, cols: 20"}
+ screen:expect { any = 'rows: 10, cols: 20' }
else
screen:expect([[
## grid 1
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
+ [2:--------------------------------------------------]|*6
[3:--------------------------------------------------]|
## grid 2
tty ready |
rows: 10, cols: 20 |
{1: } |
- |
- |
- |
- |
- |
- |
- |
+ |*7
## grid 3
{3:-- TERMINAL --} |
]])
@@ -234,16 +210,11 @@ describe(':terminal with multigrid', function()
screen:try_resize_grid(2, 70, 3)
if is_os('win') then
- screen:expect{any="rows: 3, cols: 70"}
+ screen:expect { any = 'rows: 3, cols: 70' }
else
screen:expect([[
## grid 1
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
+ [2:--------------------------------------------------]|*6
[3:--------------------------------------------------]|
## grid 2
rows: 10, cols: 20 |
@@ -256,16 +227,11 @@ describe(':terminal with multigrid', function()
screen:try_resize_grid(2, 0, 0)
if is_os('win') then
- screen:expect{any="rows: 6, cols: 50"}
+ screen:expect { any = 'rows: 6, cols: 50' }
else
screen:expect([[
## grid 1
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
- [2:--------------------------------------------------]|
+ [2:--------------------------------------------------]|*6
[3:--------------------------------------------------]|
## grid 2
tty ready |