0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1910

Problem:    Tests using external command to delete directory.
Solution:   Use delete().
This commit is contained in:
Bram Moolenaar 2016-06-08 21:48:50 +02:00
parent 945ec093cd
commit abc70bbf36
4 changed files with 10 additions and 29 deletions

View File

@ -9,13 +9,7 @@ STARTTEST
:else :else
: set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,} : set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
:endif :endif
:function! DeleteDirectory(dir) :"
: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
: exec "silent !rmdir /Q /S " . a:dir
: else
: exec "silent !rm -rf " . a:dir
: endif
:endfun
:if has("unix") :if has("unix")
:let $CDIR = "." :let $CDIR = "."
/CDIR /CDIR
@ -45,7 +39,7 @@ STARTTEST
:" check for 'include' without \zs or \ze :" check for 'include' without \zs or \ze
:lang C :lang C
:call delete("./Xbase.a") :call delete("./Xbase.a")
:call DeleteDirectory("Xdir1") :call delete("Xdir1", "rf")
:!mkdir Xdir1 :!mkdir Xdir1
:!mkdir "Xdir1/dir2" :!mkdir "Xdir1/dir2"
:e! Xdir1/dir2/foo.a :e! Xdir1/dir2/foo.a
@ -70,7 +64,7 @@ ENDTEST
STARTTEST STARTTEST
:" check for 'include' with \zs and \ze :" check for 'include' with \zs and \ze
:call delete("./Xbase.b") :call delete("./Xbase.b")
:call DeleteDirectory("Xdir1") :call delete("Xdir1", "rf")
:!mkdir Xdir1 :!mkdir Xdir1
:!mkdir "Xdir1/dir2" :!mkdir "Xdir1/dir2"
:let &include='^\s*%inc\s*/\zs[^/]\+\ze' :let &include='^\s*%inc\s*/\zs[^/]\+\ze'
@ -100,7 +94,7 @@ ENDTEST
STARTTEST STARTTEST
:" check for 'include' with \zs and no \ze :" check for 'include' with \zs and no \ze
:call delete("./Xbase.c") :call delete("./Xbase.c")
:call DeleteDirectory("Xdir1") :call delete("Xdir1", "rf")
:!mkdir Xdir1 :!mkdir Xdir1
:!mkdir "Xdir1/dir2" :!mkdir "Xdir1/dir2"
:let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze' :let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze'

View File

@ -9,16 +9,9 @@ STARTTEST
:set visualbell :set visualbell
:set nocp viminfo+=nviminfo :set nocp viminfo+=nviminfo
:" :"
:function! DeleteDirectory(dir)
: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
: exec "silent !rmdir /Q /S " . a:dir
: else
: exec "silent !rm -rf " . a:dir
: endif
:endfun
:" On windows a stale "Xfind" directory may exist, remove it so that :" On windows a stale "Xfind" directory may exist, remove it so that
:" we start from a clean state. :" we start from a clean state.
:call DeleteDirectory("Xfind") :call delete("Xfind", "rf")
:new :new
:let cwd=getcwd() :let cwd=getcwd()
:let test_out = cwd . '/test.out' :let test_out = cwd . '/test.out'
@ -170,7 +163,7 @@ SVoyager 2:w
:exec "w >>" . test_out :exec "w >>" . test_out
:q :q
:exec "cd " . cwd :exec "cd " . cwd
:call DeleteDirectory("Xfind") :call delete("Xfind", "rf")
:qa! :qa!
ENDTEST ENDTEST

View File

@ -9,14 +9,6 @@ STARTTEST
:set visualbell :set visualbell
:set nocp viminfo+=nviminfo :set nocp viminfo+=nviminfo
:" :"
:function! DeleteDirectory(dir)
: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
: exec "silent !rmdir /Q /S " . a:dir
: else
: exec "silent !rm -rf " . a:dir
: endif
:endfun
:"
:function! GetCwdInfo(win, tab) :function! GetCwdInfo(win, tab)
: let tab_changed = 0 : let tab_changed = 0
: let mod = ":t" : let mod = ":t"
@ -42,7 +34,7 @@ STARTTEST
:endfunction :endfunction
:" On windows a stale "Xtopdir" directory may exist, remove it so that :" On windows a stale "Xtopdir" directory may exist, remove it so that
:" we start from a clean state. :" we start from a clean state.
:call DeleteDirectory("Xtopdir") :call delete("Xtopdir", "rf")
:let r=[] :let r=[]
:new :new
:let cwd=getcwd() :let cwd=getcwd()
@ -94,7 +86,7 @@ STARTTEST
:call writefile(r, test_out, "a") :call writefile(r, test_out, "a")
:q :q
:exec "cd " . cwd :exec "cd " . cwd
:call DeleteDirectory("Xtopdir") :call delete("Xtopdir", "rf")
:qa! :qa!
ENDTEST ENDTEST

View File

@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1910,
/**/ /**/
1909, 1909,
/**/ /**/