2013-08-30 22:44:20 -04:00
|
|
|
call airline#init#bootstrap()
|
2013-08-31 17:42:09 -04:00
|
|
|
call airline#init#sections()
|
2013-09-01 10:38:00 -04:00
|
|
|
source plugin/airline.vim
|
2013-08-30 22:44:20 -04:00
|
|
|
|
|
|
|
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
|
2013-09-01 10:38:00 -04:00
|
|
|
|
|
|
|
it 'should only render warning section in active splits'
|
|
|
|
wincmd s
|
2013-09-05 10:01:57 -04:00
|
|
|
Expect airline#statusline(1) =~ 'warning'
|
|
|
|
Expect airline#statusline(2) !~ 'warning'
|
2013-09-01 10:38:00 -04:00
|
|
|
wincmd c
|
|
|
|
end
|
2013-08-30 22:44:20 -04:00
|
|
|
end
|
|
|
|
|