comparison src/testdir/test_autocmd.vim @ 22742:f7f2d73ff85e v8.2.1919

patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution Commit: https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 28 20:20:00 2020 +0100 patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution Problem: Assert_fails() setting emsg_silent changes normal execution. Solution: Use a separate flag in_assert_fails.
author Bram Moolenaar <Bram@vim.org>
date Wed, 28 Oct 2020 20:30:04 +0100
parents 170077e26bde
children ffb173dbf228
comparison
equal deleted inserted replaced
22741:8c4ba2a7a44f 22742:f7f2d73ff85e
192 augroup test_autocmd_bufunload 192 augroup test_autocmd_bufunload
193 autocmd! 193 autocmd!
194 exe 'autocmd BufUnload <buffer> ' . (lastbuf + 1) . 'bwipeout!' 194 exe 'autocmd BufUnload <buffer> ' . (lastbuf + 1) . 'bwipeout!'
195 augroup END 195 augroup END
196 196
197 call assert_fails('edit bb.txt', ['E937:', 'E517:']) 197 call assert_fails('edit bb.txt', 'E937:')
198 198
199 autocmd! test_autocmd_bufunload 199 autocmd! test_autocmd_bufunload
200 augroup! test_autocmd_bufunload 200 augroup! test_autocmd_bufunload
201 bwipe! aa.txt 201 bwipe! aa.txt
202 bwipe! bb.txt 202 bwipe! bb.txt
1766 endfunc 1766 endfunc
1767 1767
1768 func Test_nocatch_wipe_all_buffers() 1768 func Test_nocatch_wipe_all_buffers()
1769 " Real nasty autocommand: wipe all buffers on any event. 1769 " Real nasty autocommand: wipe all buffers on any event.
1770 au * * bwipe * 1770 au * * bwipe *
1771 call assert_fails('next x', ['E94:', 'E517:']) 1771 call assert_fails('next x', ['E94:', 'E937:'])
1772 bwipe 1772 bwipe
1773 au! 1773 au!
1774 endfunc 1774 endfunc
1775 1775
1776 func Test_nocatch_wipe_dummy_buffer() 1776 func Test_nocatch_wipe_dummy_buffer()