comparison src/testdir/test_autocmd.vim @ 11961:0240e7e3d736 v8.0.0861

patch 8.0.0861: still many old style tests commit https://github.com/vim/vim/commit/4a137b45864310060410f34cb9c7d0f0231bb256 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 4 22:37:11 2017 +0200 patch 8.0.0861: still many old style tests Problem: Still many old style tests. Solution: Convert several tests to new style. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Fri, 04 Aug 2017 22:45:04 +0200
parents 1395a3b6978d
children d2e367d9de1f
comparison
equal deleted inserted replaced
11960:e9776f970210 11961:0240e7e3d736
611 " Cleanup 611 " Cleanup
612 au! OptionSet 612 au! OptionSet
613 call test_override('starting', 0) 613 call test_override('starting', 0)
614 "delfunc! AutoCommandOptionSet 614 "delfunc! AutoCommandOptionSet
615 endfunc 615 endfunc
616
617 " Test for Bufleave autocommand that deletes the buffer we are about to edit.
618 func Test_BufleaveWithDelete()
619 new | edit Xfile1
620
621 augroup test_bufleavewithdelete
622 autocmd!
623 autocmd BufLeave Xfile1 bwipe Xfile2
624 augroup END
625
626 call assert_fails('edit Xfile2', 'E143:')
627 call assert_equal('Xfile1', bufname('%'))
628
629 autocmd! test_bufleavewithdelete BufLeave Xfile1
630 augroup! test_bufleavewithdelete
631
632 new
633 bwipe! Xfile1
634 endfunc