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 Jul 26, 2021
1 parent b199fbe commit 8cbcf01
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.__modules__() abort
let modules = themis#suite('helptags for module')

function! modules.before() abort
helptags doc
endfunction

function! modules.__each_modules__() abort
let t_func = type(function('type'))
let V = vital#vital#new()
for module_name in V.search('**')
if module_name =~# '^\%(Deprecated\|Experimental\)\.'
continue
endif
let module = V.import(module_name)
let suite = themis#suite(module_name)
for member_name in keys(module)
let args = type(module[member_name]) == t_func ? '()' : ''
let tagname = printf('Vital.%s.%s%s', module_name, member_name, args)
execute join([
\ printf('function! suite.%s()', member_name),
\ printf(' help %s', tagname),
\ 'endfunction',
\ ], "\n")
endfor
endfor
endfunction
endfunction

0 comments on commit 8cbcf01

Please sign in to comment.