summaryrefslogtreecommitdiff
path: root/src/testdir/test_trycatch.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-12-14 16:18:15 +0100
committerBram Moolenaar <Bram@vim.org>2019-12-14 16:18:15 +0100
commita6e8f888e7fc31b8ab7233509254fb2e2fe4089f (patch)
treecef20e90b6736c286442b40a1169aed2263ec984 /src/testdir/test_trycatch.vim
parentf5f4b6cb5f6174458848d2fbc0388379222c8a0f (diff)
downloadvim-git-a6e8f888e7fc31b8ab7233509254fb2e2fe4089f.tar.gz
patch 8.2.0004: get E685 and E931 if buffer reload is interruptedv8.2.0004
Problem: Get E685 and E931 if buffer reload is interrupted. Solution: Do not abort deleting a dummy buffer. (closes #5361)
Diffstat (limited to 'src/testdir/test_trycatch.vim')
-rw-r--r--src/testdir/test_trycatch.vim27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/testdir/test_trycatch.vim b/src/testdir/test_trycatch.vim
index 7e513180a..adc1745b3 100644
--- a/src/testdir/test_trycatch.vim
+++ b/src/testdir/test_trycatch.vim
@@ -1972,6 +1972,29 @@ func Test_builtin_func_error()
call assert_equal('jlmnpqrtueghivyzACD', g:Xpath)
endfunc
-" Modelines {{{1
+func Test_reload_in_try_catch()
+ call writefile(['x'], 'Xreload')
+ set autoread
+ edit Xreload
+ tabnew
+ call writefile(['xx'], 'Xreload')
+ augroup ReLoad
+ au FileReadPost Xreload let x = doesnotexist
+ au BufReadPost Xreload let x = doesnotexist
+ augroup END
+ try
+ edit Xreload
+ catch
+ endtry
+ tabnew
+
+ tabclose
+ tabclose
+ autocmd! ReLoad
+ set noautoread
+ bwipe! Xreload
+ call delete('Xreload')
+endfunc
+
+" Modeline {{{1
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
-"-------------------------------------------------------------------------------