diff options
Diffstat (limited to 'test/functional/shada/buffers_spec.lua')
-rw-r--r-- | test/functional/shada/buffers_spec.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/functional/shada/buffers_spec.lua b/test/functional/shada/buffers_spec.lua index 04c9c01d7c..26a4569fce 100644 --- a/test/functional/shada/buffers_spec.lua +++ b/test/functional/shada/buffers_spec.lua @@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local nvim_command, funcs, eq, curbufmeths = helpers.command, helpers.funcs, helpers.eq, helpers.curbufmeths +local expect_exit = helpers.expect_exit local shada_helpers = require('test.functional.shada.helpers') local reset, clear = shada_helpers.reset, shada_helpers.clear @@ -15,7 +16,7 @@ describe('shada support code', function() reset('set shada+=%') nvim_command('edit ' .. testfilename) nvim_command('edit ' .. testfilename_2) - nvim_command('qall') + expect_exit(nvim_command, 'qall') reset('set shada+=%') eq(3, funcs.bufnr('$')) eq('', funcs.bufname(1)) @@ -27,7 +28,7 @@ describe('shada support code', function() reset('set shada+=%') nvim_command('edit ' .. testfilename) nvim_command('edit ' .. testfilename_2) - nvim_command('qall') + expect_exit(nvim_command, 'qall') reset() eq(1, funcs.bufnr('$')) eq('', funcs.bufname(1)) @@ -37,7 +38,7 @@ describe('shada support code', function() reset() nvim_command('edit ' .. testfilename) nvim_command('edit ' .. testfilename_2) - nvim_command('qall') + expect_exit(nvim_command, 'qall') reset('set shada+=%') eq(1, funcs.bufnr('$')) eq('', funcs.bufname(1)) @@ -48,7 +49,7 @@ describe('shada support code', function() nvim_command('edit ' .. testfilename) nvim_command('edit ' .. testfilename_2) curbufmeths.set_option('buflisted', false) - nvim_command('qall') + expect_exit(nvim_command, 'qall') reset('set shada+=%') eq(2, funcs.bufnr('$')) eq('', funcs.bufname(1)) @@ -60,7 +61,7 @@ describe('shada support code', function() nvim_command('edit ' .. testfilename) nvim_command('edit ' .. testfilename_2) curbufmeths.set_option('buftype', 'quickfix') - nvim_command('qall') + expect_exit(nvim_command, 'qall') reset('set shada+=%') eq(2, funcs.bufnr('$')) eq('', funcs.bufname(1)) @@ -73,7 +74,7 @@ describe('shada support code', function() nvim_command('enew') curbufmeths.set_lines(0, 1, true, {'bar'}) eq(2, funcs.bufnr('$')) - nvim_command('qall!') + expect_exit(nvim_command, 'qall!') reset('set shada+=% hidden') eq(1, funcs.bufnr('$')) eq('', funcs.bufname(1)) @@ -83,7 +84,7 @@ describe('shada support code', function() reset('set shada+=%1') nvim_command('edit ' .. testfilename) nvim_command('edit ' .. testfilename_2) - nvim_command('qall') + expect_exit(nvim_command, 'qall') reset('set shada+=%1') eq(2, funcs.bufnr('$')) eq('', funcs.bufname(1)) |