Skip to content

Commit 8cbcf01

Browse files
committed
Add test for helptags
1 parent b199fbe commit 8cbcf01

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

test/help.vim

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
let s:suite = themis#suite('help')
2+
3+
function! s:suite.after() abort
4+
if filereadable('doc/tags')
5+
call delete('doc/tags')
6+
endif
7+
endfunction
8+
9+
function! s:suite.__modules__() abort
10+
let modules = themis#suite('helptags for module')
11+
12+
function! modules.before() abort
13+
helptags doc
14+
endfunction
15+
16+
function! modules.__each_modules__() abort
17+
let t_func = type(function('type'))
18+
let V = vital#vital#new()
19+
for module_name in V.search('**')
20+
if module_name =~# '^\%(Deprecated\|Experimental\)\.'
21+
continue
22+
endif
23+
let module = V.import(module_name)
24+
let suite = themis#suite(module_name)
25+
for member_name in keys(module)
26+
let args = type(module[member_name]) == t_func ? '()' : ''
27+
let tagname = printf('Vital.%s.%s%s', module_name, member_name, args)
28+
execute join([
29+
\ printf('function! suite.%s()', member_name),
30+
\ printf(' help %s', tagname),
31+
\ 'endfunction',
32+
\ ], "\n")
33+
endfor
34+
endfor
35+
endfunction
36+
endfunction

0 commit comments

Comments
 (0)