@@ -58,18 +58,17 @@ func Test_cd_minus()
5858 call writefile (v: errors , ' Xresult' )
5959 qall !
6060 [SCRIPT]
61- call writefile (lines , ' Xscript' )
61+ call writefile (lines , ' Xscript' , ' D ' )
6262 if RunVim ([], [], ' --clean -S Xscript' )
6363 call assert_equal ([], readfile (' Xresult' ))
6464 endif
65- call delete (' Xscript' )
6665 call delete (' Xresult' )
6766endfunc
6867
6968" Test for chdir()
7069func Test_chdir_func ()
7170 let topdir = getcwd ()
72- call mkdir (' Xchdir/y/z' , ' p ' )
71+ call mkdir (' Xchdir/y/z' , ' pR ' )
7372
7473 " Create a few tabpages and windows with different directories
7574 new
@@ -110,13 +109,12 @@ func Test_chdir_func()
110109
111110 only | tabonly
112111 call chdir (topdir)
113- call delete (' Xchdir' , ' rf' )
114112endfunc
115113
116114" Test for changing to the previous directory '-'
117115func Test_prev_dir ()
118116 let topdir = getcwd ()
119- call mkdir (' Xprevdir/a/b/c' , ' p ' )
117+ call mkdir (' Xprevdir/a/b/c' , ' pR ' )
120118
121119 " Create a few tabpages and windows with different directories
122120 new | only
@@ -173,7 +171,6 @@ func Test_prev_dir()
173171
174172 only | tabonly
175173 call chdir (topdir)
176- call delete (' Xprevdir' , ' rf' )
177174endfunc
178175
179176func Test_lcd_split ()
@@ -201,22 +198,18 @@ func Test_cd_from_non_existing_dir()
201198endfunc
202199
203200func Test_cd_completion ()
204- call mkdir (' XComplDir1' , ' p ' )
205- call mkdir (' XComplDir2' , ' p ' )
206- call writefile ([], ' XComplFile' )
201+ call mkdir (' XComplDir1' , ' D ' )
202+ call mkdir (' XComplDir2' , ' D ' )
203+ call writefile ([], ' XComplFile' , ' D ' )
207204
208205 for cmd in [' cd' , ' chdir' , ' lcd' , ' lchdir' , ' tcd' , ' tchdir' ]
209206 call feedkeys (' :' .. cmd .. " XCompl\<C-A>\<C-B> \" \<CR> " , ' tx' )
210207 call assert_equal (' "' .. cmd .. ' XComplDir1/ XComplDir2/' , @: )
211208 endfor
212-
213- call delete (' XComplDir1' , ' d' )
214- call delete (' XComplDir2' , ' d' )
215- call delete (' XComplFile' )
216209endfunc
217210
218211func Test_cd_unknown_dir ()
219- call mkdir (' Xa' )
212+ call mkdir (' Xa' , ' R ' )
220213 cd Xa
221214 call writefile ([' text' ], ' Xb.txt' )
222215 edit Xa/Xb.txt
@@ -229,14 +222,13 @@ func Test_cd_unknown_dir()
229222
230223 bwipe!
231224 exe " bwipe! " .. first_buf
232- call delete (' Xa' , ' rf' )
233225endfunc
234226
235227func Test_getcwd_actual_dir ()
236228 CheckOption autochdir
237229
238230 let startdir = getcwd ()
239- call mkdir (' Xactual' )
231+ call mkdir (' Xactual' , ' R ' )
240232 call test_autochdir ()
241233 set autochdir
242234 edit Xactual/file .txt
@@ -250,7 +242,6 @@ func Test_getcwd_actual_dir()
250242 set noautochdir
251243 bwipe!
252244 call chdir (startdir)
253- call delete (' Xactual' , ' rf' )
254245endfunc
255246
256247" vim: shiftwidth = 2 sts = 2 expandtab
0 commit comments