mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 09:41:33 +08:00
Fix failing tests
This commit is contained in:
parent
a96681d459
commit
6ee75bdbde
|
@ -81,6 +81,7 @@ function! s:airline_toggle()
|
|||
if exists("s:stl")
|
||||
let &stl = s:stl
|
||||
endif
|
||||
call airline#highlighter#reset_hlcache()
|
||||
|
||||
silent doautocmd User AirlineToggledOff
|
||||
else
|
||||
|
|
|
@ -19,6 +19,7 @@ describe 'active builder'
|
|||
end
|
||||
|
||||
it 'should reuse highlight group if background colors match'
|
||||
call airline#highlighter#reset_hlcache()
|
||||
highlight Foo1 ctermfg=1 ctermbg=2
|
||||
highlight Foo2 ctermfg=1 ctermbg=2
|
||||
call s:builder.add_section('Foo1', 'hello')
|
||||
|
@ -28,6 +29,7 @@ describe 'active builder'
|
|||
end
|
||||
|
||||
it 'should switch highlight groups if foreground colors differ'
|
||||
call airline#highlighter#reset_hlcache()
|
||||
highlight Foo1 ctermfg=1 ctermbg=2
|
||||
highlight Foo2 ctermfg=2 ctermbg=2
|
||||
call s:builder.add_section('Foo1', 'hello')
|
||||
|
|
|
@ -5,6 +5,7 @@ describe 'themes'
|
|||
end
|
||||
|
||||
it 'should extract correct colors'
|
||||
call airline#highlighter#reset_hlcache()
|
||||
highlight Foo ctermfg=1 ctermbg=2
|
||||
let colors = airline#themes#get_highlight('Foo')
|
||||
Expect colors[2] == '1'
|
||||
|
@ -12,6 +13,7 @@ describe 'themes'
|
|||
end
|
||||
|
||||
it 'should extract from normal if colors unavailable'
|
||||
call airline#highlighter#reset_hlcache()
|
||||
highlight Normal ctermfg=100 ctermbg=200
|
||||
highlight Foo ctermbg=2
|
||||
let colors = airline#themes#get_highlight('Foo')
|
||||
|
@ -20,6 +22,7 @@ describe 'themes'
|
|||
end
|
||||
|
||||
it 'should flip target group if it is reversed'
|
||||
call airline#highlighter#reset_hlcache()
|
||||
highlight Foo ctermbg=222 ctermfg=103 term=reverse
|
||||
let colors = airline#themes#get_highlight('Foo')
|
||||
Expect colors[2] == '222'
|
||||
|
@ -27,6 +30,8 @@ describe 'themes'
|
|||
end
|
||||
|
||||
it 'should pass args through correctly'
|
||||
call airline#highlighter#reset_hlcache()
|
||||
hi clear Normal
|
||||
let hl = airline#themes#get_highlight('Foo', 'bold', 'italic')
|
||||
Expect hl == ['', '', 'NONE', 'NONE', 'bold,italic']
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user