patch 8.2.0174: various commands not completely tested
Problem: Various commands not completely tested.
Solution: Add more test cases. (Yegappan Lakshmanan, closes #5551)
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index 7a74af6..e3f2c10 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -640,3 +640,24 @@
set novisualbell
set belloff=all
endfunc
+
+" Test for the 'write' option
+func Test_write()
+ new
+ call setline(1, ['L1'])
+ set nowrite
+ call assert_fails('write Xfile', 'E142:')
+ set write
+ close!
+endfunc
+
+" Test for 'buftype' option
+func Test_buftype()
+ new
+ call setline(1, ['L1'])
+ set buftype=nowrite
+ call assert_fails('write', 'E382:')
+ close!
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab