mirror of
https://github.com/neovim/neovim.git
synced 2025-09-09 04:48:18 +00:00
functests: Fix legacy/close_count_spec
This commit is contained in:
@@ -4,6 +4,7 @@ local helpers = require('test.functional.helpers')(after_each)
|
|||||||
|
|
||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
local wait = helpers.wait
|
local wait = helpers.wait
|
||||||
|
local eval = helpers.eval
|
||||||
local feed = helpers.feed
|
local feed = helpers.feed
|
||||||
local clear = helpers.clear
|
local clear = helpers.clear
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
@@ -13,9 +14,7 @@ describe('close_count', function()
|
|||||||
|
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
command('let tests = []')
|
command('let tests = []')
|
||||||
command('for i in range(5)')
|
command('for i in range(5)|new|endfor')
|
||||||
command('new')
|
|
||||||
command('endfor')
|
|
||||||
command('4wincmd w')
|
command('4wincmd w')
|
||||||
command('close!')
|
command('close!')
|
||||||
command('let buffers = []')
|
command('let buffers = []')
|
||||||
@@ -50,9 +49,7 @@ describe('close_count', function()
|
|||||||
command('only!')
|
command('only!')
|
||||||
command('b1')
|
command('b1')
|
||||||
command('let tests = []')
|
command('let tests = []')
|
||||||
command('for i in range(5)')
|
command('for i in range(5)|new|endfor')
|
||||||
command('new')
|
|
||||||
command('endfor')
|
|
||||||
command('let buffers = []')
|
command('let buffers = []')
|
||||||
command('windo call add(buffers, bufnr("%"))')
|
command('windo call add(buffers, bufnr("%"))')
|
||||||
eq({13, 12, 11, 10, 9, 1}, eval('buffers'))
|
eq({13, 12, 11, 10, 9, 1}, eval('buffers'))
|
||||||
@@ -91,9 +88,7 @@ describe('close_count', function()
|
|||||||
command('b1')
|
command('b1')
|
||||||
command('let tests = []')
|
command('let tests = []')
|
||||||
command('set hidden')
|
command('set hidden')
|
||||||
command('for i in range(5)')
|
command('for i in range(5)|new|endfor')
|
||||||
command('new')
|
|
||||||
command('endfor')
|
|
||||||
command('1wincmd w')
|
command('1wincmd w')
|
||||||
command('$ hide')
|
command('$ hide')
|
||||||
command('let buffers = []')
|
command('let buffers = []')
|
||||||
@@ -112,9 +107,7 @@ describe('close_count', function()
|
|||||||
command('b1')
|
command('b1')
|
||||||
command('let tests = []')
|
command('let tests = []')
|
||||||
command('set hidden')
|
command('set hidden')
|
||||||
command('for i in range(5)')
|
command('for i in range(5)|new|endfor')
|
||||||
command('new')
|
|
||||||
command('endfor')
|
|
||||||
command('4wincmd w')
|
command('4wincmd w')
|
||||||
feed('<C-W>c<cr>')
|
feed('<C-W>c<cr>')
|
||||||
wait()
|
wait()
|
||||||
|
Reference in New Issue
Block a user