tests for configuring accents directly.

This commit is contained in:
Bailey Ling 2013-09-15 22:52:42 -04:00
parent 02aa620a92
commit 0a6b833e7c
2 changed files with 9 additions and 0 deletions

View File

@ -30,6 +30,10 @@ function! airline#parts#define_condition(key, predicate)
call airline#parts#define(a:key, { 'condition': a:predicate }) call airline#parts#define(a:key, { 'condition': a:predicate })
endfunction endfunction
function! airline#parts#define_accent(key, accent)
call airline#parts#define(a:key, { 'accent': a:accent })
endfunction
function! airline#parts#define_empty(keys) function! airline#parts#define_empty(keys)
for key in a:keys for key in a:keys
call airline#parts#define_raw(key, '') call airline#parts#define_raw(key, '')

View File

@ -30,5 +30,10 @@ describe 'parts'
call airline#parts#define_condition('part', '1') call airline#parts#define_condition('part', '1')
Expect airline#parts#get('part').condition == '1' Expect airline#parts#get('part').condition == '1'
end end
it 'can define a accent'
call airline#parts#define_accent('part', 'red')
Expect airline#parts#get('part').accent == 'red'
end
end end