test some commands
This commit is contained in:
parent
0548aeefcb
commit
54ec1f39ca
|
@ -56,6 +56,7 @@ endfunction!
|
|||
function! airline#extensions#whitespace#toggle()
|
||||
if s:enabled
|
||||
autocmd! airline_whitespace CursorHold,BufWritePost
|
||||
augroup! airline_whitespace
|
||||
let s:enabled = 0
|
||||
else
|
||||
call airline#extensions#whitespace#init()
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
call airline#init#bootstrap()
|
||||
source plugin/airline.vim
|
||||
|
||||
describe 'commands'
|
||||
it 'should toggle off and on'
|
||||
execute 'AirlineToggle'
|
||||
Expect exists('#airline') to_be_false
|
||||
execute 'AirlineToggle'
|
||||
Expect exists('#airline') to_be_true
|
||||
end
|
||||
|
||||
it 'should toggle whitespace off and on'
|
||||
execute 'AirlineToggleWhitespace'
|
||||
Expect exists('#airline_whitespace') to_be_false
|
||||
execute 'AirlineToggleWhitespace'
|
||||
Expect exists('#airline_whitespace') to_be_true
|
||||
end
|
||||
|
||||
it 'should display theme name with no args'
|
||||
execute 'AirlineTheme simple'
|
||||
Expect g:airline_theme == 'simple'
|
||||
execute 'AirlineTheme dark'
|
||||
Expect g:airline_theme == 'dark'
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue