diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-05-19 17:15:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-19 17:15:04 +0200 |
commit | 46aa6f93acb5d932d2893606d980a6b4b8a9594c (patch) | |
tree | 8db600bf818c86a923bbf7375c0858f2c6967978 /src/testdir/test_buffer.vim | |
parent | 56c9fd01076bc62b55c8cb89d8a66f6136e52f3a (diff) | |
download | vim-git-46aa6f93acb5d932d2893606d980a6b4b8a9594c.tar.gz |
patch 8.2.2873: not enough tests for writing buffersv8.2.2873
Problem: Not enough tests for writing buffers.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes #8229)
Diffstat (limited to 'src/testdir/test_buffer.vim')
-rw-r--r-- | src/testdir/test_buffer.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_buffer.vim b/src/testdir/test_buffer.vim index 4e8a79f0c..960a760eb 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 |