Skip to content

Commit a8f5a49

Browse files
committed
Add test for helptags
1 parent 748bcc2 commit a8f5a49

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

test/help.vim

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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.make_helptags() abort
10+
" Detect E154
11+
helptags doc
12+
endfunction
13+
14+
function! s:suite.__modules__() abort
15+
let modules = themis#suite('helptags for module')
16+
17+
function! modules.before() abort
18+
helptags doc
19+
endfunction
20+
21+
function! modules.__each_modules__() abort
22+
let t_func = type(function('type'))
23+
let V = vital#vital#new()
24+
for module_name in V.search('**')
25+
if module_name =~# '^\%(Deprecated\|Experimental\)\.'
26+
continue
27+
endif
28+
let module = V.import(module_name)
29+
let suite = themis#suite(module_name)
30+
for member_name in keys(module)
31+
let args = type(module[member_name]) == t_func ? '()' : ''
32+
let tagname = printf('Vital.%s.%s%s', module_name, member_name, args)
33+
execute join([
34+
\ printf('function! suite.%s()', member_name),
35+
\ printf(' help %s', tagname),
36+
\ 'endfunction',
37+
\ ], "\n")
38+
endfor
39+
endfor
40+
endfunction
41+
endfunction

0 commit comments

Comments
 (0)