diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-18 21:54:41 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-18 21:54:41 +0100 |
commit | 406cd90f1963ca60813db91c413eef4b1b78ee44 (patch) | |
tree | 87c555c66bbfa8c3c2f4b8984e8d4463f0a79b0a /src/testdir/test_autocmd.vim | |
parent | 9e2bcb5d23138d45a0b6f9c1542b5facc807efe7 (diff) |
patch 8.2.0275: some Ex code not covered by testsv8.2.0275
Problem: Some Ex code not covered by tests.
Solution: Add test cases. (Yegappan Lakshmanan, closes #5659)
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r-- | src/testdir/test_autocmd.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index 3b071049c2..a16329b8cd 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -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 |