Add NERDTree tests

This commit is contained in:
ZyX 2015-01-06 01:13:48 +03:00
parent 2bd25d7979
commit 548e330fd8
2 changed files with 20 additions and 0 deletions

11
tests/test_nerdtree_plugin.vim Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/vim -S
set nocompatible
set columns=80
execute 'source' fnameescape(expand('<sfile>:p:h').'/vim_utils.vim')
call EnablePlugins('nerdtree')
call SourcePowerline()
NERDTree /home
redrawstatus
call CheckCurrentStatusline('%#Pl_231_16777215_240_5789784_bold# /home %#Pl_240_5789784_236_3158064_NONE# %#Pl_231_16777215_236_3158064_NONE#                      ')
call CheckMessages()
qall

View File

@ -46,6 +46,15 @@ endfunction
function CheckRecordedStatuslineValue(expected)
return CheckStatuslineValue(g:statusline_value, a:expected)
endfunction
function GetCurrentStatusline()
if &l:statusline[:1] isnot# '%!'
ERR 'Statusline does not start with %!', &l:statusline
endif
return eval(&l:statusline[2:])
endfunction
function CheckCurrentStatusline(expected)
return CheckStatuslineValue(GetCurrentStatusline(), a:expected)
endfunction
function CheckMessages()
if !empty(g:powerline_log_messages)
LST ['Unexpected messages in log'] + g:powerline_log_messages