Merge pull request #2688 from vim-airline/fix-test

chore: update test
This commit is contained in:
IK 2024-09-11 02:39:31 +09:00 committed by GitHub
commit 81eca99486
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,14 +4,16 @@ Describe themes.vim
highlight clear Normal highlight clear Normal
End End
It should extract correct colors It should extract correct colors with No termguicolors
call airline#highlighter#reset_hlcache() if !exists("+termguicolors")
highlight Foo ctermfg=1 ctermbg=2 call airline#highlighter#reset_hlcache()
let colors = airline#themes#get_highlight('Foo') highlight Foo ctermfg=1 ctermbg=2
Assert Equals(colors[0], 'NONE') let colors = airline#themes#get_highlight('Foo')
Assert Equals(colors[1], 'NONE') Assert Equals(colors[0], 'NONE')
Assert Equals(colors[2], '1') Assert Equals(colors[1], 'NONE')
Assert Equals(colors[3], '2') Assert Equals(colors[2], '1')
Assert Equals(colors[3], '2')
endif
End End
if exists("+termguicolors") if exists("+termguicolors")