Refine test cases by checking message output

This commit is contained in:
Alexandre Carlton 2014-11-30 21:15:46 +11:00
parent 73551bf34f
commit 4e118cf10c
2 changed files with 7 additions and 4 deletions

View File

@ -587,7 +587,7 @@ function! s:do(pull, force, todo)
let installed = has_key(s:update.new, name)
let updated = installed ? 0 :
\ (a:pull && !empty(s:system_chomp('git log --pretty=format:"%h" "HEAD...HEAD@{1}"', spec.dir)))
if a:force || installed || updated
if a:force || installed || updated
execute 'cd' s:esc(spec.dir)
call append(3, '- Post-update hook for '. name .' ... ')
let type = type(spec.do)

View File

@ -627,7 +627,8 @@ Execute (Single uninstalled executable):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'needs': 'does-not-exist' }
call plug#end()
PlugInstall!
PlugInstall
AssertExpect 'Please install does-not-exist first.', 0
q
Assert !isdirectory(g:plugs['vim-easy-align'].dir),
\ 'vim-easy-align should not exist'
@ -636,7 +637,8 @@ Execute (Multiple uninstalled executables):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'needs': ['does-not-exist', 'also-non-existent'] }
call plug#end()
PlugInstall!
PlugInstall
AssertExpect 'Please install does-not-exist, also-non-existent first.', 0
q
Assert !isdirectory(g:plugs['vim-easy-align'].dir),
\ 'vim-easy-align should not exist'
@ -645,7 +647,8 @@ Execute (Multiple uninstalled/installed executables):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'needs': ['does-not-exist', 'sh'] }
call plug#end()
PlugInstall!
PlugInstall
AssertExpect 'Please install does-not-exist first.', 0
q
Assert !isdirectory(g:plugs['vim-easy-align'].dir),
\ 'vim-easy-align should not exist'