1
0
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:
Bram Moolenaar
2020-02-18 21:54:41 +01:00
parent 9e2bcb5d23
commit 406cd90f19
8 changed files with 147 additions and 1 deletions

View File

@@ -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