|
|
@ -1,6 +1,10 @@ |
|
|
" vim -u test/vimrc |
|
|
" vim -u test/vimrc |
|
|
set nocompatible |
|
|
set nocompatible |
|
|
|
|
|
|
|
|
|
|
|
syntax on |
|
|
|
|
|
|
|
|
|
|
|
silent exec 'e '.expand('<sfile>') |
|
|
|
|
|
|
|
|
filetype off |
|
|
filetype off |
|
|
runtime macros/matchit.vim |
|
|
runtime macros/matchit.vim |
|
|
set rtp+=~/.vim/vundle.git/ |
|
|
set rtp+=~/.vim/vundle.git/ |
|
|
@ -41,42 +45,49 @@ Bundle! '~/.vim/vundle.git/test/' |
|
|
|
|
|
|
|
|
" just create one |
|
|
" just create one |
|
|
Bundle! 'a_plugin' |
|
|
Bundle! 'a_plugin' |
|
|
|
|
|
" |
|
|
|
|
|
" just create one |
|
|
|
|
|
Bundle! 'b_plugin', {'name': 'zzz'} |
|
|
|
|
|
|
|
|
filetype plugin indent on " Automatically detect file types. |
|
|
filetype plugin indent on " Automatically detect file types. |
|
|
|
|
|
|
|
|
set wildignore+=doc " should not break helptags |
|
|
set wildignore+=doc " should not break helptags |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
augroup vimrc |
|
|
augroup vimrc |
|
|
au WinEnter * call s:test() |
|
|
|
|
|
|
|
|
au WinEnter * call Test() |
|
|
augroup END |
|
|
augroup END |
|
|
|
|
|
|
|
|
func! s:test() |
|
|
|
|
|
if 'ok' != g:vundle_test_plugin() != 'ok' |
|
|
|
|
|
|
|
|
func! Test() abort |
|
|
|
|
|
if 'ok' != g:vundle_test_plugin() |
|
|
throw 'ooops' |
|
|
throw 'ooops' |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
call s:assert_bundles() |
|
|
|
|
|
|
|
|
|
|
|
call s:asser_a_bundle() |
|
|
|
|
|
|
|
|
call Assert_bundles() |
|
|
|
|
|
call Assert_a_bundle() |
|
|
|
|
|
call Assert_b_bundle() |
|
|
endf |
|
|
endf |
|
|
|
|
|
|
|
|
func! s:assert(cond, msg) |
|
|
|
|
|
if !a:cond |
|
|
|
|
|
|
|
|
func! Assert(cond, msg) |
|
|
|
|
|
if !(a:cond) |
|
|
throw a:msg |
|
|
throw a:msg |
|
|
endif |
|
|
endif |
|
|
endf |
|
|
endf |
|
|
|
|
|
|
|
|
func! s:assert_bundles() abort |
|
|
|
|
|
|
|
|
func! Assert_bundles() abort |
|
|
for b in g:vundle#bundles |
|
|
for b in g:vundle#bundles |
|
|
call assert(b.nosync() || b.installed(), b.name.' not installed') |
|
|
|
|
|
|
|
|
call Assert(b.nosync() || b.installed(), b.name.' not installed') |
|
|
endfor |
|
|
endfor |
|
|
endf |
|
|
endf |
|
|
|
|
|
|
|
|
func! s:assert_a_bundle() abort |
|
|
|
|
|
let b = filter(copy(g:vundle#bundles), 'v:var.name = "a_bundle"')[0] |
|
|
|
|
|
let c = b.path() != expand(g:vundle#bundle_dir.'/'.'a_name') |
|
|
|
|
|
call s:assert(c, ' a_plugin isnt instaled') |
|
|
|
|
|
|
|
|
func! Assert_a_bundle() abort |
|
|
|
|
|
let b = filter(copy(g:vundle#bundles), 'v:val.name == "a_plugin"')[0] |
|
|
|
|
|
let c = (b.path() == expand(g:vundle#bundle_dir.'/'.'a_plugin')) |
|
|
|
|
|
call Assert(c, b.name.' isnt instaled') |
|
|
|
|
|
endf |
|
|
|
|
|
|
|
|
|
|
|
func! Assert_b_bundle() abort |
|
|
|
|
|
let b = filter(copy(g:vundle#bundles), 'v:val.name == "zzz"')[0] |
|
|
|
|
|
let c = (b.path() == expand(g:vundle#bundle_dir.'/'.'zzz')) |
|
|
|
|
|
call Assert(c, b.name.' isnt instaled') |
|
|
endf |
|
|
endf |
|
|
|
|
|
|