aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_buffer.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-07 07:58:37 +0800
committerGitHub <noreply@github.com>2022-11-07 07:58:37 +0800
commit9b9f84bc62a01ed76b9f53119781816bd3375267 (patch)
treec1c6e5463d515ddc174ca71554d1203f29983c28 /src/nvim/testdir/test_buffer.vim
parent3b3611a3d0f1e13e277360d6bacf97a0fb7eb6de (diff)
parent7e1d9c560b09cacb78b2fc8f9428a77d6fca66e1 (diff)
downloadrneovim-9b9f84bc62a01ed76b9f53119781816bd3375267.tar.gz
rneovim-9b9f84bc62a01ed76b9f53119781816bd3375267.tar.bz2
rneovim-9b9f84bc62a01ed76b9f53119781816bd3375267.zip
Merge pull request #20982 from zeertzjq/vim-8.2.2849
vim-patch:8.2.{2849,2856,2873}: buffer writing tests
Diffstat (limited to 'src/nvim/testdir/test_buffer.vim')
-rw-r--r--src/nvim/testdir/test_buffer.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_buffer.vim b/src/nvim/testdir/test_buffer.vim
index d8d22ff872..3300278802 100644
--- a/src/nvim/testdir/test_buffer.vim
+++ b/src/nvim/testdir/test_buffer.vim
@@ -434,4 +434,24 @@ func Test_buf_pattern_invalid()
bwipe!
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