mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
fix parts being undefined when referenced by sections in vimrc (#207).
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user