Add tests

This commit is contained in:
Alexandre Carlton 2014-11-30 21:01:49 +11:00
parent 74e0b2c2bb
commit 73551bf34f

View File

@ -613,6 +613,69 @@ Execute (Retry failed tasks):
AssertExpect! '[xxx]', 1 AssertExpect! '[xxx]', 1
q q
**********************************************************************
~ Build requirements check (`needs` option)
**********************************************************************
Execute (Cleanup):
call plug#begin()
call plug#end()
PlugClean!
q
Execute (Single uninstalled executable):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'needs': 'does-not-exist' }
call plug#end()
PlugInstall!
q
Assert !isdirectory(g:plugs['vim-easy-align'].dir),
\ 'vim-easy-align should not exist'
Execute (Multiple uninstalled executables):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'needs': ['does-not-exist', 'also-non-existent'] }
call plug#end()
PlugInstall!
q
Assert !isdirectory(g:plugs['vim-easy-align'].dir),
\ 'vim-easy-align should not exist'
Execute (Multiple uninstalled/installed executables):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'needs': ['does-not-exist', 'sh'] }
call plug#end()
PlugInstall!
q
Assert !isdirectory(g:plugs['vim-easy-align'].dir),
\ 'vim-easy-align should not exist'
Execute (Single installed executable):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'needs': 'sh' }
call plug#end()
PlugInstall!
q
Assert isdirectory(g:plugs['vim-easy-align'].dir),
\ 'vim-easy-align should exist'
Execute (Cleanup):
call plug#begin()
call plug#end()
PlugClean!
q
Execute (Multiple installed executables):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'needs': ['sh', 'bash'] }
call plug#end()
PlugInstall!
q
Assert isdirectory(g:plugs['vim-easy-align'].dir),
\ 'vim-easy-align should exist'
********************************************************************** **********************************************************************
~ Post-update hook (`do` option) ~ Post-update hook (`do` option)
********************************************************************** **********************************************************************