mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
multigrid: simplify tests
This commit is contained in:
@@ -1,20 +1,16 @@
|
|||||||
local helpers = require('test.functional.helpers')(after_each)
|
local helpers = require('test.functional.helpers')(after_each)
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local spawn, set_session = helpers.spawn, helpers.set_session
|
local clear = helpers.clear
|
||||||
local feed, command, insert = helpers.feed, helpers.command, helpers.insert
|
local feed, command, insert = helpers.feed, helpers.command, helpers.insert
|
||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
|
|
||||||
|
|
||||||
describe('multigrid screen', function()
|
describe('multigrid screen', function()
|
||||||
local screen
|
local screen
|
||||||
local nvim_argv = {helpers.nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
|
|
||||||
'--cmd', 'set shortmess+=I background=light noswapfile belloff= noshowcmd noruler',
|
|
||||||
'--embed'}
|
|
||||||
|
|
||||||
before_each(function()
|
before_each(function()
|
||||||
local screen_nvim = spawn(nvim_argv)
|
clear{headless=false, args={'--cmd', 'set laststatus=2'}}
|
||||||
set_session(screen_nvim)
|
screen = Screen.new(53,14)
|
||||||
screen = Screen.new()
|
|
||||||
screen:attach({ext_multigrid=true})
|
screen:attach({ext_multigrid=true})
|
||||||
screen:set_default_attr_ids({
|
screen:set_default_attr_ids({
|
||||||
[1] = {bold = true, foreground = Screen.colors.Blue1},
|
[1] = {bold = true, foreground = Screen.colors.Blue1},
|
||||||
@@ -1125,7 +1121,7 @@ describe('multigrid screen', function()
|
|||||||
|
|
||||||
command([[
|
command([[
|
||||||
func! ErrMsg()
|
func! ErrMsg()
|
||||||
for i in range(12)
|
for i in range(11)
|
||||||
echoerr "error ".i
|
echoerr "error ".i
|
||||||
endfor
|
endfor
|
||||||
endfunc]])
|
endfunc]])
|
||||||
@@ -1145,7 +1141,7 @@ describe('multigrid screen', function()
|
|||||||
{14:error 8} |
|
{14:error 8} |
|
||||||
{14:error 9} |
|
{14:error 9} |
|
||||||
{14:error 10} |
|
{14:error 10} |
|
||||||
{15:-- More --}^ |
|
{15:Press ENTER or type command to continue}^ |
|
||||||
## grid 2
|
## grid 2
|
||||||
|
|
|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
|
|||||||
@@ -240,7 +240,6 @@ function Screen:try_resize(columns, rows)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Screen:try_resize_grid(grid, columns, rows)
|
function Screen:try_resize_grid(grid, columns, rows)
|
||||||
self._grid = self._grids[1]
|
|
||||||
self.uimeths.try_resize_grid(grid, columns, rows)
|
self.uimeths.try_resize_grid(grid, columns, rows)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user