vimwiki/test/tabnext_delay.vader
2019-07-14 07:32:38 -06:00

32 lines
691 B
Plaintext

Before (Setup):
let g:vimwiki_folding = 'expr:quick'
" clear mappings so plugin can be reloaded
" this is needed if running manually multiple times
nmapclear
" reload the plugin to set the fold method
unlet g:loaded_vimwiki
source plugin/vimwiki.vim
Execute (Expect < 0.5 second delay: Issue #580):
" prep
edit test/resources/delay.wiki
normal! 50%
normal! zozo
tabedit
" run test
let start = reltime()
tabprev
redraw
let end = str2float(reltimestr(reltime(start)))
" cleanup
bdelete test/resources/delay.wiki
tabclose
" verify
Log 'Elapsed time = ' . string(end)
Assert end < 0.5, 'Took longer than expected: ' . string(end) . ' seconds'