aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_options.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-15 19:26:32 +0800
committerGitHub <noreply@github.com>2022-07-15 19:26:32 +0800
commitb9f15caf5ca879841afe582f68838af208b86142 (patch)
tree783afc0e6f1cc54610b20fe27aeb26625158b5af /src/nvim/testdir/test_options.vim
parent564d99c89a3d9a236df758d320cc38abc50215ec (diff)
parent0cf5cd1ac9c8ec31c1d2f1b1a6585153a45fc4e9 (diff)
downloadrneovim-b9f15caf5ca879841afe582f68838af208b86142.tar.gz
rneovim-b9f15caf5ca879841afe582f68838af208b86142.tar.bz2
rneovim-b9f15caf5ca879841afe582f68838af208b86142.zip
Merge pull request #19375 from zeertzjq/vim-8.2.0403
vim-patch:8.1.1547,8.2.0403: when 'buftype' is "nofile" there is no overwrite check
Diffstat (limited to 'src/nvim/testdir/test_options.vim')
-rw-r--r--src/nvim/testdir/test_options.vim11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index 9f89d47758..3de84d2ae9 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -741,7 +741,16 @@ func Test_buftype()
call setline(1, ['L1'])
set buftype=nowrite
call assert_fails('write', 'E382:')
- close!
+
+ " for val in ['', 'nofile', 'nowrite', 'acwrite', 'quickfix', 'help', 'terminal', 'prompt', 'popup']
+ for val in ['', 'nofile', 'nowrite', 'acwrite', 'quickfix', 'help', 'prompt']
+ exe 'set buftype=' .. val
+ call writefile(['something'], 'XBuftype')
+ call assert_fails('write XBuftype', 'E13:', 'with buftype=' .. val)
+ endfor
+
+ call delete('XBuftype')
+ bwipe!
endfunc
" Test for the 'shellquote' option