Skip to content

Commit

Permalink
Add test for helptags
Browse files Browse the repository at this point in the history
  • Loading branch information
thinca committed Jun 26, 2016
1 parent 20bcbd2 commit 8a0bce5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/help.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
let s:suite = themis#suite('help')

function! s:suite.after() abort
if filereadable('doc/tags')
call delete('doc/tags')
endif
endfunction

function! s:suite.make_helptags() abort
" Detect E154
helptags doc
endfunction

function! s:suite.__modules__() abort
let modules = themis#suite('helptags for module')

function! modules.before() abort
helptags doc
endfunction

function! modules.__each_modules__() abort
let V = vital#of('vital')
for module_name in V.search('**')
let module = V.import(module_name)
let suite = themis#suite(module_name)
for func_name in keys(module)
let tagname = printf('Vital.%s.%s()', module_name, func_name)
execute join([
\ printf('function! suite.%s()', func_name),
\ printf(' help %s', tagname),
\ 'endfunction',
\ ], "\n")
endfor
endfor
endfunction
endfunction

0 comments on commit 8a0bce5

Please sign in to comment.