Explicitly reset s:-variables during test

This commit is contained in:
Junegunn Choi
2015-05-28 12:34:43 +09:00
parent 7760f1c22b
commit 2ed1f27aa2
3 changed files with 27 additions and 0 deletions

View File

@@ -39,6 +39,19 @@ Execute (Initialize test environment):
endif
endfunction
" Reload vim-plug to reset s:-variables
function! ReloadPlug()
let tmp = tempname()
try
call writefile(readfile(globpath(&rtp, 'autoload/plug.vim')), tmp)
unlet g:loaded_plug
execute 'source' tmp
let &rtp = g:basertp
finally
call delete(tmp)
endtry
endfunction
Execute (Print Interpreter Version):
redir => out
if has('ruby')
@@ -66,6 +79,7 @@ Execute (Cleanup):
silent! delf AssertExpect
silent! delf PlugUpdated
silent! delf EnsureLoaded
silent! delf ReloadPlug
silent! delc AssertExpect
silent! unmap /
silent! unmap ?