0
0
mirror of https://github.com/vim/vim.git synced 2025-11-16 23:24:03 -05:00

patch 8.2.2873: not enough tests for writing buffers

Problem:    Not enough tests for writing buffers.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8229)
This commit is contained in:
Yegappan Lakshmanan
2021-05-19 17:15:04 +02:00
committed by Bram Moolenaar
parent 56c9fd0107
commit 46aa6f93ac
5 changed files with 72 additions and 3 deletions

View File

@@ -381,4 +381,24 @@ func Test_balt()
call assert_equal('OtherBuffer', bufname())
endfunc
" Test for the 'maxmem' and 'maxmemtot' options
func Test_buffer_maxmem()
" use 1KB per buffer and 2KB for all the buffers
set maxmem=1 maxmemtot=2
new
let v:errmsg = ''
" try opening some files
edit test_arglist.vim
call assert_equal('test_arglist.vim', bufname())
edit test_eval_stuff.vim
call assert_equal('test_eval_stuff.vim', bufname())
b test_arglist.vim
call assert_equal('test_arglist.vim', bufname())
b test_eval_stuff.vim
call assert_equal('test_eval_stuff.vim', bufname())
close
call assert_equal('', v:errmsg)
set maxmem& maxmemtot&
endfunc
" vim: shiftwidth=2 sts=2 expandtab