vim-airline/test/commands.vimspec

51 lines
1.2 KiB
Plaintext

Describe commands.vim
It should toggle off and on
execute 'AirlineToggle'
Assert False(exists('#airline'))
execute 'AirlineToggle'
Assert True(exists('#airline'))
End
It should toggle whitespace off
call airline#extensions#load()
execute 'AirlineToggleWhitespace'
Assert False(exists('#airline_whitespace'))
End
It should toggle whitespace on
call airline#extensions#load()
execute 'AirlineToggleWhitespace'
Assert True(exists('#airline_whitespace'))
End
It should display theme name "simple"
execute 'AirlineTheme simple'
Assert Equals(g:airline_theme, 'simple')
End
It should display theme name "dark"'
execute 'AirlineTheme dark'
Assert Equals(g:airline_theme, 'dark')
End
It should display theme name "dark" because specifying a name that does not exist
execute 'AirlineTheme doesnotexist'
Assert Equals(g:airline_theme, 'dark')
End
It should display theme name molokai
colors molokai
Assert Equals(g:airline_theme, 'molokai')
End
It should have a refresh command
Assert Equals(exists(':AirlineRefresh'), 2)
End
It should have a extensions command
Assert Equals(exists(':AirlineExtensions'), 2)
End
End