restore highlight group with accents for all types of parts. resolves #272.

This commit is contained in:
Bailey Ling
2013-09-23 15:45:44 +00:00
parent b07362947e
commit 248c9b0e29
2 changed files with 19 additions and 12 deletions

View File

@@ -26,13 +26,20 @@ describe 'section'
Expect s == '%{airline#util#prepend("text",0)}%{airline#util#wrap("text",0)}'
end
it 'should prefix with accent group if provided'
it 'should prefix with accent group if provided and restore afterwards'
call airline#parts#define('hi', {
\ 'raw': 'hello',
\ 'accent': 'red',
\ })
let s = airline#section#create(['hi'])
Expect s == '%#__accent_red#hello'
Expect s == '%#__accent_red#hello%#__restore__#'
end
it 'should accent functions'
call airline#parts#define_function('hi', 'Hello')
call airline#parts#define_accent('hi', 'bold')
let s = airline#section#create(['hi'])
Expect s == '%#__accent_bold#%{airline#util#wrap(Hello(),0)}%#__restore__#'
end
it 'should parse out a section from the distro'