From 8cbcf012766ebe9e881b60631a094e93359c0dc0 Mon Sep 17 00:00:00 2001 From: thinca Date: Sun, 26 Jun 2016 17:44:30 +0900 Subject: [PATCH] Add test for helptags --- test/help.vim | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/help.vim diff --git a/test/help.vim b/test/help.vim new file mode 100644 index 000000000..b400738e0 --- /dev/null +++ b/test/help.vim @@ -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