tests: add test for tabaline

This commit is contained in:
Christian Brabandt 2018-07-13 22:30:20 +02:00
parent 5aef1b90e5
commit eac10a104f
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 21 additions and 0 deletions

21
t/extensions_tabline.vim Normal file
View File

@ -0,0 +1,21 @@
let g:airline#extensions#tabline#enabled = 1
source plugin/airline.vim
doautocmd VimEnter
describe 'default'
it 'should use a tabline'
e! CHANGELOG.md
sp CONTRIBUTING.md
Expect airline#extensions#tabline#get() == "%#airline_tabhid# %(%{airline#extensions#tabline#get_buffer_name(1)}%) | %(%{airline#extensions#tabline#get_buffer_name(2)}%) | %(%{airline#extensions#tabline#get_buffer_name(3)}%) %#airline_tabhid_to_airline_tab# %#airline_tab#%(%{airline#extensions#tabline#get_buffer_name(4)}%) %#airline_tab_to_airline_tabsel# %#airline_tabsel#%(%{airline#extensions#tabline#get_buffer_name(5)}%) %#airline_tabsel_to_airline_tabfill# %#airline_tabfill#%=%#airline_tabfill_to_airline_tabfill#%#airline_tabfill#%#airline_tabfill_to_airline_tablabel#%#airline_tablabel# buffers "
end
it 'Trigger on BufDelete autocommands'
e! CHANGELOG.md
sp CONTRIBUTING.md
sp README.md
2bd
Expect airline#extensions#tabline#get() == "%#airline_tabhid# %(%{airline#extensions#tabline#get_buffer_name(1)}%) | %(%{airline#extensions#tabline#get_buffer_name(3)}%) %#airline_tabhid_to_airline_tab# %#airline_tab#%(%{airline#extensions#tabline#get_buffer_name(4)}%) | %(%{airline#extensions#tabline#get_buffer_name(5)}%) %#airline_tab_to_airline_tabsel# %#airline_tabsel#%(%{airline#extensions#tabline#get_buffer_name(6)}%) %#airline_tabsel_to_airline_tabfill# %#airline_tabfill#%=%#airline_tabfill_to_airline_tabfill#%#airline_tabfill#%#airline_tabfill_to_airline_tablabel#%#airline_tablabel# buffers "
end
end