From 89a2b67f2427d961bb2f0de771a0290d85e379f9 Mon Sep 17 00:00:00 2001 From: xero Date: Mon, 5 May 2014 15:09:26 -0400 Subject: add vim configs -- yes i have joined the cult of vim --- .vim/bundle/vim-airline/t/extensions_default.vim | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .vim/bundle/vim-airline/t/extensions_default.vim (limited to '.vim/bundle/vim-airline/t/extensions_default.vim') diff --git a/.vim/bundle/vim-airline/t/extensions_default.vim b/.vim/bundle/vim-airline/t/extensions_default.vim new file mode 100644 index 0000000..b98e816 --- /dev/null +++ b/.vim/bundle/vim-airline/t/extensions_default.vim @@ -0,0 +1,32 @@ +let g:airline_theme = 'dark' +call airline#init#bootstrap() +call airline#init#sections() +source plugin/airline.vim + +describe 'default' + before + let s:builder = airline#builder#new({'active': 1}) + end + + it 'should use the layout' + let g:airline#extensions#default#layout = [ + \ [ 'c', 'a', 'b', 'warning' ], + \ [ 'x', 'z', 'y' ] + \ ] + call airline#extensions#default#apply(s:builder, { 'winnr': 1, 'active': 1 }) + let stl = s:builder.build() + Expect stl =~ 'airline_c_to_airline_a' + Expect stl =~ 'airline_a_to_airline_b' + Expect stl =~ 'airline_b_to_airline_warning' + Expect stl =~ 'airline_x_to_airline_z' + Expect stl =~ 'airline_z_to_airline_y' + end + + it 'should only render warning section in active splits' + wincmd s + Expect airline#statusline(1) =~ 'warning' + Expect airline#statusline(2) !~ 'warning' + wincmd c + end +end + -- cgit v1.2.1