Fix Travis CI build

This commit is contained in:
Junegunn Choi 2015-05-29 01:07:31 +09:00
parent f85d4d774b
commit 240dc9cbb6
2 changed files with 12 additions and 15 deletions

View File

@ -66,14 +66,14 @@ Execute (#130 Proper cleanup of on-demand loading triggers):
**********************************************************************
Execute (#131 Syntax error):
call plug#begin('/no-permission')
call plug#begin('/proc/no-permission')
Plug 'junegunn/vim-emoji'
call plug#end()
redir => out
silent PlugInstall
redir END
Assert out =~ 'Invalid plug directory: /no-permission'
Assert out =~ 'Invalid plug directory: /proc/no-permission', out
**********************************************************************
Execute (#139-1 Using new remote branch):

View File

@ -11,6 +11,11 @@ Execute (Initialize test environment):
let $PLUG_SRC = globpath(&rtp, 'autoload/plug.vim')
endif
" Temporarily patch plug.vim
call system('cp $PLUG_SRC $PLUG_SRC.org')
call writefile(extend(readfile($PLUG_SRC),
\ ['function! ResetPlug()', 'let s:loaded = {}', 'endfunction']), $PLUG_SRC)
set t_Co=256
colo default
pclose
@ -40,22 +45,13 @@ Execute (Initialize test environment):
call system(printf('rm -rf "%s"', a:file))
endfunction
" Reload vim-plug to reset s:-variables
function! ReloadPlug()
let tmpdir = tempname()
let tmp = tmpdir.'/plug.vim'
call mkdir(tmpdir, 'p')
try
call writefile(readfile($PLUG_SRC), tmp)
unlet! g:loaded_plug
execute 'source' tmp
let &rtp = g:base_rtp
finally
call RmRf(tmpdir)
endtry
call ResetPlug()
source $PLUG_SRC
let &rtp = g:base_rtp
endfunction
call ReloadPlug()
source $PLUG_SRC
Execute (Print Interpreter Version):
redir => out
@ -84,6 +80,7 @@ Execute (Cleanup):
silent! delc AssertExpect
silent! unmap /
silent! unmap ?
call system('mv $PLUG_SRC.org $PLUG_SRC')
Restore