aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_autocmd.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-16 11:46:17 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-16 15:04:41 +0800
commitf39b33ee491a4a8d4b08425e582dd0dd53617edf (patch)
tree0214457dc93e79a07307268ea5015ecc49579c9c /test/old/testdir/test_autocmd.vim
parent7b05ddbb72717f995fedc81583d73f82c78c881d (diff)
downloadrneovim-f39b33ee491a4a8d4b08425e582dd0dd53617edf.tar.gz
rneovim-f39b33ee491a4a8d4b08425e582dd0dd53617edf.tar.bz2
rneovim-f39b33ee491a4a8d4b08425e582dd0dd53617edf.zip
vim-patch:9.0.0411: only created files can be cleaned up with one call
Problem: Only created files can be cleaned up with one call. Solution: Add flags to mkdir() to delete with a deferred function. Expand the writefile() name to a full path to handle changing directory. https://github.com/vim/vim/commit/6f14da15ac900589f2f413d77898b9bff3b31ece vim-patch:8.2.3742: dec mouse test fails without gnome terminfo entry Problem: Dec mouse test fails without gnome terminfo entry. Solution: Check if there is a gnome entry. Also fix 'acd' test on MS-Windows. (Dominique Pellé, closes vim/vim#9282) https://github.com/vim/vim/commit/f589fd3e1047cdf90566b68aaf9a13389e54d26a Cherry-pick test_autochdir.vim changes from patch 9.0.0313. Cherry-pick test_autocmd.vim changes from patch 9.0.0323. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir/test_autocmd.vim')
-rw-r--r--test/old/testdir/test_autocmd.vim17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim
index 6d7f1649b3..ec671369f5 100644
--- a/test/old/testdir/test_autocmd.vim
+++ b/test/old/testdir/test_autocmd.vim
@@ -918,14 +918,13 @@ func Test_BufEnter()
call assert_equal('++', g:val)
" Also get BufEnter when editing a directory
- call mkdir('Xdir')
- split Xdir
+ call mkdir('Xbufenterdir', 'D')
+ split Xbufenterdir
call assert_equal('+++', g:val)
" On MS-Windows we can't edit the directory, make sure we wipe the right
" buffer.
- bwipe! Xdir
- call delete('Xdir', 'd')
+ bwipe! Xbufenterdir
au! BufEnter
" Editing a "nofile" buffer doesn't read the file but does trigger BufEnter
@@ -2186,11 +2185,10 @@ func Test_BufWriteCmd()
new
file Xbufwritecmd
set buftype=acwrite
- call mkdir('Xbufwritecmd')
+ call mkdir('Xbufwritecmd', 'D')
write
" BufWriteCmd should be triggered even if a directory has the same name
call assert_equal(1, g:written)
- call delete('Xbufwritecmd', 'd')
unlet g:written
au! BufWriteCmd
bwipe!
@@ -2947,16 +2945,15 @@ func Test_throw_in_BufWritePre()
endfunc
func Test_autocmd_in_try_block()
- call mkdir('Xdir')
+ call mkdir('Xintrydir', 'R')
au BufEnter * let g:fname = expand('%')
try
- edit Xdir/
+ edit Xintrydir/
endtry
- call assert_match('Xdir', g:fname)
+ call assert_match('Xintrydir', g:fname)
unlet g:fname
au! BufEnter
- call delete('Xdir', 'rf')
endfunc
func Test_autocmd_CmdWinEnter()