mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-01-09 13:02:19 +08:00
support for conditional parts. resolves #238.
This commit is contained in:
@@ -55,5 +55,12 @@ describe 'section'
|
||||
let s = airline#section#create_right(['%t', 'asdf', '%{getcwd()}'])
|
||||
Expect s == '%t < asdf < %{getcwd()}'
|
||||
end
|
||||
|
||||
it 'should empty out parts that do not pass their condition'
|
||||
call airline#parts#define_text('conditional', 'conditional')
|
||||
call airline#parts#define_condition('conditional', '0')
|
||||
let s = airline#section#create(['conditional'])
|
||||
Expect s == '%{0 ? airline#util#wrap("conditional",0) : ""}'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user