vim-patch:8.2.2856: get readonly error for device that can't be written to

Problem:    Get readonly error for device that can't be written to.
Solution:   Check for being able to write first. (closes vim/vim#8205)

50157ef1c2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-07 07:06:49 +08:00
parent b0190f4543
commit bdf87efeb5
2 changed files with 17 additions and 2 deletions

View File

@@ -298,7 +298,7 @@ func Test_write_errors()
\ && getftype('/dev/loop0') == 'bdev' && !IsRoot()
new
edit /dev/loop0
call assert_fails('write', 'E505: ')
call assert_fails('write', 'E503: ')
call assert_fails('write!', 'E503: ')
close!
endif