mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-23 20:45:31 -07:00
parent
cd44b03db2
commit
ddc67fc136
2
plug.vim
2
plug.vim
@ -605,7 +605,7 @@ function! plug#helptags()
|
||||
return s:err('plug#begin was not called')
|
||||
endif
|
||||
for spec in values(g:plugs)
|
||||
let docd = join([spec.dir, 'doc'], '/')
|
||||
let docd = join([s:rtp(spec), 'doc'], '/')
|
||||
if isdirectory(docd)
|
||||
silent! execute 'helptags' s:esc(docd)
|
||||
endif
|
||||
|
4
test/run
4
test/run
@ -77,6 +77,10 @@ DOC
|
||||
|
||||
make_dirs yyy/ yyy
|
||||
make_dirs yyy/after yyy
|
||||
mkdir -p "$PLUG_FIXTURES/yyy/rtp/doc"
|
||||
cat > "$PLUG_FIXTURES/yyy/rtp/doc/yyy.txt" << DOC
|
||||
hello *yyy*
|
||||
DOC
|
||||
gitinit yyy
|
||||
|
||||
make_dirs z1/ z1
|
||||
|
@ -1130,10 +1130,17 @@ Before:
|
||||
**********************************************************************
|
||||
|
||||
Execute (plug#helptags):
|
||||
call plug#begin()
|
||||
Plug '$PLUG_FIXTURES/xxx'
|
||||
Plug '$PLUG_FIXTURES/yyy', { 'rtp': 'rtp' }
|
||||
call plug#end()
|
||||
silent! call delete(expand('$PLUG_FIXTURES/xxx/doc/tags'))
|
||||
silent! call delete(expand('$PLUG_FIXTURES/yyy/rtp/doc/tags'))
|
||||
Assert !filereadable(expand('$PLUG_FIXTURES/xxx/doc/tags'))
|
||||
Assert !filereadable(expand('$PLUG_FIXTURES/yyy/rtp/doc/tags'))
|
||||
AssertEqual 1, plug#helptags()
|
||||
Assert filereadable(expand('$PLUG_FIXTURES/xxx/doc/tags'))
|
||||
Assert filereadable(expand('$PLUG_FIXTURES/yyy/rtp/doc/tags'))
|
||||
|
||||
**********************************************************************
|
||||
~ Manual loading
|
||||
@ -1141,6 +1148,10 @@ Execute (plug#helptags):
|
||||
|
||||
Execute (plug#load - invalid arguments):
|
||||
call ResetPlug()
|
||||
call plug#begin()
|
||||
Plug '$PLUG_FIXTURES/xxx', { 'for': 'xxx' }
|
||||
Plug '$PLUG_FIXTURES/yyy', { 'for': 'yyy' }
|
||||
call plug#end()
|
||||
AssertEqual 0, plug#load()
|
||||
AssertEqual 0, plug#load('non-existent-plugin')
|
||||
AssertEqual 0, plug#load('non-existent-plugin', 'another-non-existent-plugin')
|
||||
|
Loading…
Reference in New Issue
Block a user