move part declarations back into init.

This commit is contained in:
Bailey Ling
2013-08-31 22:48:27 -04:00
parent c908d03cc0
commit 69f40d62ee
3 changed files with 20 additions and 16 deletions

View File

@@ -8,10 +8,6 @@ describe 'section'
call airline#parts#define_text('text', 'text')
call airline#parts#define_raw('raw', 'raw')
call airline#parts#define_function('func', 'SectionSpec')
call airline#parts#define('hi', {
\ 'raw': 'hello',
\ 'highlight': 'hlgroup',
\ })
end
it 'should create sections with no separators'
@@ -30,6 +26,10 @@ describe 'section'
end
it 'should prefix with highlight group if provided'
call airline#parts#define('hi', {
\ 'raw': 'hello',
\ 'highlight': 'hlgroup',
\ })
let s = airline#section#create(['hi'])
Expect s == '%#hlgroup#hello'
end
@@ -38,5 +38,10 @@ describe 'section'
let s = airline#section#create(['whitespace'])
Expect s =~ 'airline#extensions#whitespace#check'
end
it 'should use parts as is if they are not found'
let s = airline#section#create(['asdf', 'func'])
Expect s == 'asdf%{airline#util#wrap(SectionSpec(),0)}'
end
end