test: don't detach screen just to change the size

This commit is contained in:
Björn Linse 2019-06-03 11:23:10 +02:00
parent c96aed2ba7
commit 3d24bb48e7
2 changed files with 6 additions and 18 deletions

View File

@ -705,11 +705,8 @@ describe('ui/ext_messages', function()
end)
it('wildmode=list', function()
local default_attr = screen:get_default_attr_ids()
screen:detach()
screen = Screen.new(25, 7)
screen:attach({rgb=true, ext_messages=true})
screen:set_default_attr_ids(default_attr)
screen:try_resize(25, 7)
screen:set_option('ext_popupmenu', false)
command('set wildmenu wildmode=list')
feed(':set wildm<tab>')

View File

@ -15,9 +15,6 @@ describe("'wildmenu'", function()
screen = Screen.new(25, 5)
screen:attach()
end)
after_each(function()
screen:detach()
end)
-- expect the screen stayed unchanged some time after first seen success
local function expect_stay_unchanged(args)
@ -170,9 +167,7 @@ describe("'wildmenu'", function()
it('wildmode=list,full and display+=msgsep interaction #10092', function()
-- Need more than 5 rows, else tabline is covered and will be redrawn.
screen:detach()
screen = Screen.new(25, 7)
screen:attach()
screen:try_resize(25, 7)
command('set display+=msgsep')
command('set wildmenu wildmode=list,full')
@ -211,9 +206,7 @@ describe("'wildmenu'", function()
it('wildmode=list,full and display-=msgsep interaction', function()
-- Need more than 5 rows, else tabline is covered and will be redrawn.
screen:detach()
screen = Screen.new(25, 7)
screen:attach()
screen:try_resize(25, 7)
command('set display-=msgsep')
command('set wildmenu wildmode=list,full')
@ -250,6 +243,8 @@ describe("'wildmenu'", function()
end)
it('multiple <C-D> renders correctly', function()
screen:try_resize(25, 7)
command('set laststatus=2')
command('set display+=msgsep')
feed(':set wildm')
@ -360,10 +355,6 @@ describe('ui/ext_wildmenu', function()
screen:attach({rgb=true, ext_wildmenu=true})
end)
after_each(function()
screen:detach()
end)
it('works with :sign <tab>', function()
local expected = {
'define',