summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_buffer.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_buffer.vim')
-rw-r--r--src/testdir/test_buffer.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_buffer.vim b/src/testdir/test_buffer.vim
index 4e8a79f0c6..960a760ebd 100644
--- a/src/testdir/test_buffer.vim
+++ b/src/testdir/test_buffer.vim
@@ -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