fix: remove previous executed directories to execute tests locally

This commit is contained in:
Shougo Matsushita 2021-05-14 21:54:52 +09:00
parent 4cb8a399c7
commit 77c2edcacb
3 changed files with 13 additions and 3 deletions

View File

@ -1592,6 +1592,10 @@ func Test_bufadd_bufload()
endfunc
func Test_readdir()
if isdirectory('Xdir')
call delete('Xdir', 'rf')
endif
call mkdir('Xdir')
call writefile([], 'Xdir/foo.txt')
call writefile([], 'Xdir/bar.txt')

View File

@ -1080,9 +1080,9 @@ endfunc
func Test_efm_dirstack()
" Create the directory stack and files
call mkdir('dir1')
call mkdir('dir1/a')
call mkdir('dir1/a/b')
call mkdir('dir1/c')
call mkdir('dir1/a', 'p')
call mkdir('dir1/a/b', 'p')
call mkdir('dir1/c', 'p')
call mkdir('dir2')
let lines =<< trim [DATA]
@ -3653,6 +3653,9 @@ func Xqftick_tests(cchar)
\ {'filename' : 'F7', 'lnum' : 11, 'text' : 'L11'}], 'r')
call assert_equal(2, g:Xgetlist({'changedtick' : 0}).changedtick)
if isdirectory("Xone")
call delete("Xone", 'rf')
endif
call writefile(["F8:80:L80", "F8:81:L81"], "Xone")
Xfile Xone
call assert_equal(1, g:Xgetlist({'changedtick' : 0}).changedtick)

View File

@ -20,6 +20,9 @@ describe('packadd', function()
func SetUp()
let s:topdir = expand(getcwd() . '/Xdir')
if isdirectory(s:topdir)
call delete(s:topdir, 'rf')
endif
exe 'set packpath=' . s:topdir
let s:plugdir = expand(s:topdir . '/pack/mine/opt/mytest')
endfunc