diff src/testdir/test_autocmd.vim @ 13054:197a08152ad5 v8.0.1402

patch 8.0.1402: crash with nasty autocommand commit https://github.com/vim/vim/commit/9bca805ec49eb0d2d0d0b2093f418ff425500169 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 18 12:37:55 2017 +0100 patch 8.0.1402: crash with nasty autocommand Problem: Crash with nasty autocommand. (gy741, Dominique Pelle) Solution: Check that the new current buffer isn't wiped out. (closes https://github.com/vim/vim/issues/2447)
author Christian Brabandt <cb@256bit.org>
date Mon, 18 Dec 2017 12:45:05 +0100
parents 6e81a68d63a1
children b931b2751650
line wrap: on
line diff
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -1163,3 +1163,11 @@ func Test_TextYankPost()
   unlet g:event
   bwipe!
 endfunc
+
+func Test_nocatch_wipe_all_buffers()
+  " Real nasty autocommand: wipe all buffers on any event.
+  au * * bwipe *
+  call assert_fails('next x', 'E93')
+  bwipe
+  au!
+endfunc