summaryrefslogtreecommitdiff
path: root/src/testdir/test_autocmd.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r--src/testdir/test_autocmd.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 6ebfee45e..566a07c6f 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -322,3 +322,22 @@ func Test_three_windows()
call delete('Xtestje2')
call delete('Xtestje3')
endfunc
+
+func Test_BufEnter()
+ au! BufEnter
+ au Bufenter * let val = val . '+'
+ let g:val = ''
+ split NewFile
+ call assert_equal('+', g:val)
+ bwipe!
+ call assert_equal('++', g:val)
+
+ " Also get BufEnter when editing a directory
+ call mkdir('Xdir')
+ split Xdir
+ call assert_equal('+++', g:val)
+ bwipe!
+
+ call delete('Xdir', 'd')
+ au! BufEnter
+endfunc