summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_autochdir.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-07 21:30:44 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-07 21:30:44 +0100
commit6f14da15ac900589f2f413d77898b9bff3b31ece (patch)
tree883f0ce338a539bea95f17fec21a76d5990e6076 /src/testdir/test_autochdir.vim
parentd7633114af2365e32080b61af473db347a3489c2 (diff)
patch 9.0.0411: only created files can be cleaned up with one callv9.0.0411
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.
Diffstat (limited to 'src/testdir/test_autochdir.vim')
-rw-r--r--src/testdir/test_autochdir.vim15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/testdir/test_autochdir.vim b/src/testdir/test_autochdir.vim
index 332de8f2bf..eb402539ff 100644
--- a/src/testdir/test_autochdir.vim
+++ b/src/testdir/test_autochdir.vim
@@ -28,9 +28,9 @@ endfunc
func Test_set_filename_other_window()
let cwd = getcwd()
call test_autochdir()
- call mkdir('Xa')
- call mkdir('Xb')
- call mkdir('Xc')
+ call mkdir('Xa', 'R')
+ call mkdir('Xb', 'R')
+ call mkdir('Xc', 'R')
try
args Xa/aaa.txt Xb/bbb.txt
set acd
@@ -45,9 +45,6 @@ func Test_set_filename_other_window()
bwipe! aaa.txt
bwipe! bbb.txt
bwipe! ccc.txt
- call delete('Xa', 'rf')
- call delete('Xb', 'rf')
- call delete('Xc', 'rf')
endtry
endfunc
@@ -56,7 +53,7 @@ func Test_acd_win_execute()
set acd
call test_autochdir()
- call mkdir('XacdDir')
+ call mkdir('XacdDir', 'R')
let winid = win_getid()
new XacdDir/file
call assert_match('testdir.XacdDir$', getcwd())
@@ -68,7 +65,6 @@ func Test_acd_win_execute()
bwipe!
set noacd
call chdir(cwd)
- call delete('XacdDir', 'rf')
endfunc
func Test_verbose_pwd()
@@ -78,7 +74,7 @@ func Test_verbose_pwd()
edit global.txt
call assert_match('\[global\].*testdir$', execute('verbose pwd'))
- call mkdir('Xautodir')
+ call mkdir('Xautodir', 'R')
split Xautodir/local.txt
lcd Xautodir
call assert_match('\[window\].*testdir[/\\]Xautodir', execute('verbose pwd'))
@@ -112,7 +108,6 @@ func Test_verbose_pwd()
bwipe!
call chdir(cwd)
- call delete('Xautodir', 'rf')
endfunc
func Test_multibyte()