support multiple accents in the same section (#203).

This commit is contained in:
Bailey Ling
2013-09-18 21:31:39 -04:00
parent fdbf2c05a5
commit 9d5a1744a1
4 changed files with 27 additions and 6 deletions

View File

@@ -44,6 +44,19 @@ describe 'active builder'
let stl = s:builder.build()
Expect stl == '%#Normal#%#Normal_foo#hello'
end
it 'should replace two accent groups with correct groups'
call s:builder.add_section('Normal', '%#airline_accent_foo#hello%#airline_accent_bar#world')
let stl = s:builder.build()
Expect stl =~ '%#Normal_foo#hello%#Normal_bar#world'
end
it 'should special restore group should go back to previous group'
call s:builder.add_section('Normal', '%#__restore__#')
let stl = s:builder.build()
Expect stl !~ '%#__restore__#'
Expect stl =~ '%#Normal#'
end
end
describe 'inactive builder'

View File

@@ -28,7 +28,7 @@ describe 'init'
end
it 'section c should be file'
Expect g:airline_section_c == '%<%f%m %#airline_accent_red#%{airline#util#wrap(airline#parts#readonly(),0)}'
Expect g:airline_section_c == '%<%f%m %#airline_accent_red#%{airline#util#wrap(airline#parts#readonly(),0)}%#__restore__#'
end
it 'section x should be filetype'