1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:30:04 +08:00
SpaceVim/bundle/dein.vim/test/install_base.vim
2022-01-01 22:47:56 +08:00

34 lines
827 B
VimL

" set verbose=1
let s:suite = themis#suite('install_base')
let s:assert = themis#helper('assert')
function! s:suite.rm() abort
let temp = tempname()
call writefile([], temp)
call dein#install#_rm(temp)
call s:assert.equals(filereadable(temp), 0)
endfunction
function! s:suite.copy_directories() abort
let temp = tempname()
let temp2 = tempname()
let temp3 = tempname()
call mkdir(temp)
call mkdir(temp2)
call mkdir(temp3)
call writefile([], temp.'/foo')
call writefile([], temp3.'/bar')
call s:assert.true(filereadable(temp.'/foo'))
call s:assert.true(filereadable(temp3.'/bar'))
call dein#install#_copy_directories([temp, temp3], temp2)
call s:assert.true(isdirectory(temp2))
call s:assert.true(filereadable(temp2.'/foo'))
call s:assert.true(filereadable(temp2.'/bar'))
endfunction