functests: Fix legacy/close_count_spec

This commit is contained in:
ZyX 2017-04-09 02:20:48 +03:00
parent bc98c37532
commit e170186a8d

View File

@ -4,6 +4,7 @@ local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq
local wait = helpers.wait
local eval = helpers.eval
local feed = helpers.feed
local clear = helpers.clear
local command = helpers.command
@ -13,9 +14,7 @@ describe('close_count', function()
it('is working', function()
command('let tests = []')
command('for i in range(5)')
command('new')
command('endfor')
command('for i in range(5)|new|endfor')
command('4wincmd w')
command('close!')
command('let buffers = []')
@ -50,9 +49,7 @@ describe('close_count', function()
command('only!')
command('b1')
command('let tests = []')
command('for i in range(5)')
command('new')
command('endfor')
command('for i in range(5)|new|endfor')
command('let buffers = []')
command('windo call add(buffers, bufnr("%"))')
eq({13, 12, 11, 10, 9, 1}, eval('buffers'))
@ -91,9 +88,7 @@ describe('close_count', function()
command('b1')
command('let tests = []')
command('set hidden')
command('for i in range(5)')
command('new')
command('endfor')
command('for i in range(5)|new|endfor')
command('1wincmd w')
command('$ hide')
command('let buffers = []')
@ -112,9 +107,7 @@ describe('close_count', function()
command('b1')
command('let tests = []')
command('set hidden')
command('for i in range(5)')
command('new')
command('endfor')
command('for i in range(5)|new|endfor')
command('4wincmd w')
feed('<C-W>c<cr>')
wait()