1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-26 14:10:06 +08:00
SpaceVim/test/api/vim/highlight.vader
2020-08-29 16:46:57 +08:00

28 lines
1.0 KiB
Plaintext

Execute ( SpaceVim api: vim#highlight ):
let hi = SpaceVim#api#import('vim#highlight')
let cmp =SpaceVim#api#import('vim#compatible')
highlight TestAPIVimHighlight ctermfg=11 guifg=#89DDFF guibg=#212121
let test_api_hi = hi.group2dict('TestAPIVimHighlight')
if !empty(test_api_hi.guifg)
Log test_api_hi
let id = hlID('TestAPIVimHighlight')
Log 'guifg is: ' . synIDattr(id, 'fg#', 'gui')
Log 'guibg is: ' . synIDattr(id, 'bg#', 'gui')
Log cmp.execute('hi TestAPIVimHighlight')
AssertEqual test_api_hi.guibg, '#212121'
AssertEqual test_api_hi.guifg, '#89ddff'
endif
AssertEqual test_api_hi.ctermfg, '11'
let unknown_hi = hi.group2dict('UnknownHighlightGroup')
AssertEqual unknown_hi.name, ''
AssertEqual unknown_hi.ctermbg, ''
AssertEqual unknown_hi.ctermfg, ''
AssertEqual unknown_hi.bold, ''
AssertEqual unknown_hi.italic, ''
AssertEqual unknown_hi.reverse, ''
AssertEqual unknown_hi.underline, ''
AssertEqual unknown_hi.guibg, ''
AssertEqual unknown_hi.guifg, ''
unlet hi cmp test_api_hi unknown_hi