From d813ef0097eb781baeba5d458dcb0507e2f61040 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 26 Aug 2022 22:39:13 +0800 Subject: vim-patch:9.0.0276: 'buftype' values not sufficiently tested Problem: 'buftype' values not sufficiently tested. Solution: Add and extend tests with 'buftype' values. (closes vim/vim#10988) https://github.com/vim/vim/commit/93f72cc119c796f1ccb75468ef9e446cbfb41e9b "terminal" and "popup" buffer types cannot be tested, and commenting them out causes an error, so just remove them. --- src/nvim/testdir/test_bufline.vim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/nvim/testdir/test_bufline.vim') diff --git a/src/nvim/testdir/test_bufline.vim b/src/nvim/testdir/test_bufline.vim index 939147b83b..3b5bcbce89 100644 --- a/src/nvim/testdir/test_bufline.vim +++ b/src/nvim/testdir/test_bufline.vim @@ -187,4 +187,24 @@ func Test_deletebufline_select_mode() bwipe! endfunc +func Test_setbufline_startup_nofile() + let before =<< trim [CODE] + set shortmess+=F + file Xresult + set buftype=nofile + call setbufline('', 1, 'success') + [CODE] + let after =<< trim [CODE] + set buftype= + write + quit + [CODE] + + if !RunVim(before, after, '--clean') + return + endif + call assert_equal(['success'], readfile('Xresult')) + call delete('Xresult') +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit