mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-05-03 06:20:38 +02:00
test some commands
This commit is contained in:
parent
0548aeefcb
commit
54ec1f39ca
@ -56,6 +56,7 @@ endfunction!
|
|||||||
function! airline#extensions#whitespace#toggle()
|
function! airline#extensions#whitespace#toggle()
|
||||||
if s:enabled
|
if s:enabled
|
||||||
autocmd! airline_whitespace CursorHold,BufWritePost
|
autocmd! airline_whitespace CursorHold,BufWritePost
|
||||||
|
augroup! airline_whitespace
|
||||||
let s:enabled = 0
|
let s:enabled = 0
|
||||||
else
|
else
|
||||||
call airline#extensions#whitespace#init()
|
call airline#extensions#whitespace#init()
|
||||||
|
26
t/commands.vim
Normal file
26
t/commands.vim
Normal file
@ -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…
x
Reference in New Issue
Block a user