mirror of
https://github.com/powerline/powerline.git
synced 2025-07-25 14:54:54 +02:00
Add NERDTree tests
This commit is contained in:
parent
2bd25d7979
commit
548e330fd8
11
tests/test_nerdtree_plugin.vim
Executable file
11
tests/test_nerdtree_plugin.vim
Executable 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
|
@ -46,6 +46,15 @@ endfunction
|
|||||||
function CheckRecordedStatuslineValue(expected)
|
function CheckRecordedStatuslineValue(expected)
|
||||||
return CheckStatuslineValue(g:statusline_value, a:expected)
|
return CheckStatuslineValue(g:statusline_value, a:expected)
|
||||||
endfunction
|
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()
|
function CheckMessages()
|
||||||
if !empty(g:powerline_log_messages)
|
if !empty(g:powerline_log_messages)
|
||||||
LST ['Unexpected messages in log'] + g:powerline_log_messages
|
LST ['Unexpected messages in log'] + g:powerline_log_messages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user