forked from aniani/vim
patch 8.2.0275: some Ex code not covered by tests
Problem: Some Ex code not covered by tests. Solution: Add test cases. (Yegappan Lakshmanan, closes #5659)
This commit is contained in:
@@ -2358,4 +2358,28 @@ func Test_FileType_spell()
|
||||
setglobal spellfile=
|
||||
endfunc
|
||||
|
||||
" Test closing a window or editing another buffer from a FileChangedRO handler
|
||||
" in a readonly buffer
|
||||
func Test_FileChangedRO_winclose()
|
||||
augroup FileChangedROTest
|
||||
au!
|
||||
autocmd FileChangedRO * quit
|
||||
augroup END
|
||||
new
|
||||
set readonly
|
||||
call assert_fails('normal i', 'E788:')
|
||||
close
|
||||
augroup! FileChangedROTest
|
||||
|
||||
augroup FileChangedROTest
|
||||
au!
|
||||
autocmd FileChangedRO * edit Xfile
|
||||
augroup END
|
||||
new
|
||||
set readonly
|
||||
call assert_fails('normal i', 'E788:')
|
||||
close
|
||||
augroup! FileChangedROTest
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user