blob: b98e81666cf6832771afe6f90c6f6e78cc07366b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
|