fix parts being undefined when referenced by sections in vimrc (#207).

This commit is contained in:
Bailey Ling
2013-09-25 22:13:57 -04:00
parent c8ef456a25
commit d123e3583a
3 changed files with 13 additions and 10 deletions

View File

@@ -1,6 +1,3 @@
call airline#init#bootstrap()
call airline#extensions#load()
function! SectionSpec()
endfunction
@@ -11,6 +8,11 @@ describe 'section'
call airline#parts#define_function('func', 'SectionSpec')
end
it 'should be able to reference default parts'
let s = airline#section#create(['paste'])
Expect s == '%{airline#util#wrap(airline#parts#paste(),0)}'
end
it 'should create sections with no separators'
let s = airline#section#create(['text', 'raw', 'func'])
Expect s == '%{airline#util#wrap("text",0)}raw%{airline#util#wrap(SectionSpec(),0)}'
@@ -43,6 +45,7 @@ describe 'section'
end
it 'should parse out a section from the distro'
call airline#extensions#load()
let s = airline#section#create(['whitespace'])
Expect s =~ 'airline#extensions#whitespace#check'
end