update highlight group names in the tests

This commit is contained in:
itchyny
2016-11-23 19:38:50 +09:00
parent e46447e480
commit 479a1f6ae6
2 changed files with 115 additions and 115 deletions

View File

@@ -23,14 +23,14 @@ function! s:suite.highlight()
call lightline#init() call lightline#init()
call lightline#colorscheme() call lightline#colorscheme()
let palette = lightline#palette() let palette = lightline#palette()
call s:assert.match(s:hi('LightLineLeft_normal_0'), s:pattern(palette.normal.left[0])) call s:assert.match(s:hi('LightlineLeft_normal_0'), s:pattern(palette.normal.left[0]))
call s:assert.match(s:hi('LightLineLeft_normal_1'), s:pattern(palette.normal.left[1])) call s:assert.match(s:hi('LightlineLeft_normal_1'), s:pattern(palette.normal.left[1]))
call s:assert.match(s:hi('LightLineLeft_normal_2'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineLeft_normal_2'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineRight_normal_0'), s:pattern(palette.normal.right[0])) call s:assert.match(s:hi('LightlineRight_normal_0'), s:pattern(palette.normal.right[0]))
call s:assert.match(s:hi('LightLineRight_normal_1'), s:pattern(palette.normal.right[1])) call s:assert.match(s:hi('LightlineRight_normal_1'), s:pattern(palette.normal.right[1]))
call s:assert.match(s:hi('LightLineRight_normal_2'), s:pattern(palette.normal.right[2])) call s:assert.match(s:hi('LightlineRight_normal_2'), s:pattern(palette.normal.right[2]))
call s:assert.match(s:hi('LightLineRight_normal_3'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineRight_normal_3'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) call s:assert.match(s:hi('LightlineMiddle_normal'), s:pattern(palette.normal.middle[0]))
endfunction endfunction
function! s:suite.insert() function! s:suite.insert()
@@ -39,14 +39,14 @@ function! s:suite.insert()
call lightline#colorscheme() call lightline#colorscheme()
call lightline#highlight('insert') call lightline#highlight('insert')
let palette = lightline#palette() let palette = lightline#palette()
call s:assert.match(s:hi('LightLineLeft_insert_0'), s:pattern(palette.insert.left[0])) call s:assert.match(s:hi('LightlineLeft_insert_0'), s:pattern(palette.insert.left[0]))
call s:assert.match(s:hi('LightLineLeft_insert_1'), s:pattern(palette.insert.left[1])) call s:assert.match(s:hi('LightlineLeft_insert_1'), s:pattern(palette.insert.left[1]))
call s:assert.match(s:hi('LightLineLeft_insert_2'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineLeft_insert_2'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineRight_insert_0'), s:pattern(palette.insert.right[0])) call s:assert.match(s:hi('LightlineRight_insert_0'), s:pattern(palette.insert.right[0]))
call s:assert.match(s:hi('LightLineRight_insert_1'), s:pattern(palette.insert.right[1])) call s:assert.match(s:hi('LightlineRight_insert_1'), s:pattern(palette.insert.right[1]))
call s:assert.match(s:hi('LightLineRight_insert_2'), s:pattern(palette.insert.right[2])) call s:assert.match(s:hi('LightlineRight_insert_2'), s:pattern(palette.insert.right[2]))
call s:assert.match(s:hi('LightLineRight_insert_3'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineRight_insert_3'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineMiddle_insert'), s:pattern(palette.insert.middle[0])) call s:assert.match(s:hi('LightlineMiddle_insert'), s:pattern(palette.insert.middle[0]))
endfunction endfunction
@@ -56,14 +56,14 @@ function! s:suite.visual()
call lightline#colorscheme() call lightline#colorscheme()
call lightline#highlight('visual') call lightline#highlight('visual')
let palette = lightline#palette() let palette = lightline#palette()
call s:assert.match(s:hi('LightLineLeft_visual_0'), s:pattern(palette.visual.left[0])) call s:assert.match(s:hi('LightlineLeft_visual_0'), s:pattern(palette.visual.left[0]))
call s:assert.match(s:hi('LightLineLeft_visual_1'), s:pattern(palette.visual.left[1])) call s:assert.match(s:hi('LightlineLeft_visual_1'), s:pattern(palette.visual.left[1]))
call s:assert.match(s:hi('LightLineLeft_visual_2'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineLeft_visual_2'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineRight_visual_0'), s:pattern(palette.normal.right[0])) call s:assert.match(s:hi('LightlineRight_visual_0'), s:pattern(palette.normal.right[0]))
call s:assert.match(s:hi('LightLineRight_visual_1'), s:pattern(palette.normal.right[1])) call s:assert.match(s:hi('LightlineRight_visual_1'), s:pattern(palette.normal.right[1]))
call s:assert.match(s:hi('LightLineRight_visual_2'), s:pattern(palette.normal.right[2])) call s:assert.match(s:hi('LightlineRight_visual_2'), s:pattern(palette.normal.right[2]))
call s:assert.match(s:hi('LightLineRight_visual_3'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineRight_visual_3'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) call s:assert.match(s:hi('LightlineMiddle_normal'), s:pattern(palette.normal.middle[0]))
endfunction endfunction
function! s:suite.replace() function! s:suite.replace()
@@ -72,14 +72,14 @@ function! s:suite.replace()
call lightline#colorscheme() call lightline#colorscheme()
call lightline#highlight('replace') call lightline#highlight('replace')
let palette = lightline#palette() let palette = lightline#palette()
call s:assert.match(s:hi('LightLineLeft_replace_0'), s:pattern(palette.replace.left[0])) call s:assert.match(s:hi('LightlineLeft_replace_0'), s:pattern(palette.replace.left[0]))
call s:assert.match(s:hi('LightLineLeft_replace_1'), s:pattern(palette.replace.left[1])) call s:assert.match(s:hi('LightlineLeft_replace_1'), s:pattern(palette.replace.left[1]))
call s:assert.match(s:hi('LightLineLeft_replace_2'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineLeft_replace_2'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineRight_replace_0'), s:pattern(palette.replace.right[0])) call s:assert.match(s:hi('LightlineRight_replace_0'), s:pattern(palette.replace.right[0]))
call s:assert.match(s:hi('LightLineRight_replace_1'), s:pattern(palette.replace.right[1])) call s:assert.match(s:hi('LightlineRight_replace_1'), s:pattern(palette.replace.right[1]))
call s:assert.match(s:hi('LightLineRight_replace_2'), s:pattern(palette.replace.right[2])) call s:assert.match(s:hi('LightlineRight_replace_2'), s:pattern(palette.replace.right[2]))
call s:assert.match(s:hi('LightLineRight_replace_3'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineRight_replace_3'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineMiddle_replace'), s:pattern(palette.replace.middle[0])) call s:assert.match(s:hi('LightlineMiddle_replace'), s:pattern(palette.replace.middle[0]))
endfunction endfunction
function! s:suite.left_right() function! s:suite.left_right()
@@ -92,18 +92,18 @@ function! s:suite.left_right()
call lightline#init() call lightline#init()
call lightline#colorscheme() call lightline#colorscheme()
let palette = lightline#palette() let palette = lightline#palette()
call s:assert.match(s:hi('LightLineLeft_normal_0'), s:pattern(palette.normal.left[0])) call s:assert.match(s:hi('LightlineLeft_normal_0'), s:pattern(palette.normal.left[0]))
call s:assert.match(s:hi('LightLineLeft_normal_1'), s:pattern(palette.normal.left[1])) call s:assert.match(s:hi('LightlineLeft_normal_1'), s:pattern(palette.normal.left[1]))
call s:assert.match(s:hi('LightLineLeft_normal_2'), s:pattern(palette.normal.middle[0])) call s:assert.match(s:hi('LightlineLeft_normal_2'), s:pattern(palette.normal.middle[0]))
call s:assert.match(s:hi('LightLineLeft_normal_3'), s:pattern(palette.normal.middle[0])) call s:assert.match(s:hi('LightlineLeft_normal_3'), s:pattern(palette.normal.middle[0]))
call s:assert.match(s:hi('LightLineLeft_normal_4'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineLeft_normal_4'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineRight_normal_0'), s:pattern(palette.normal.right[0])) call s:assert.match(s:hi('LightlineRight_normal_0'), s:pattern(palette.normal.right[0]))
call s:assert.match(s:hi('LightLineRight_normal_1'), s:pattern(palette.normal.right[1])) call s:assert.match(s:hi('LightlineRight_normal_1'), s:pattern(palette.normal.right[1]))
call s:assert.match(s:hi('LightLineRight_normal_2'), s:pattern(palette.normal.right[2])) call s:assert.match(s:hi('LightlineRight_normal_2'), s:pattern(palette.normal.right[2]))
call s:assert.match(s:hi('LightLineRight_normal_3'), s:pattern(palette.normal.middle[0])) call s:assert.match(s:hi('LightlineRight_normal_3'), s:pattern(palette.normal.middle[0]))
call s:assert.match(s:hi('LightLineRight_normal_4'), s:pattern(palette.normal.middle[0])) call s:assert.match(s:hi('LightlineRight_normal_4'), s:pattern(palette.normal.middle[0]))
call s:assert.match(s:hi('LightLineRight_normal_5'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineRight_normal_5'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) call s:assert.match(s:hi('LightlineMiddle_normal'), s:pattern(palette.normal.middle[0]))
endfunction endfunction
function! s:suite.no_components() function! s:suite.no_components()
@@ -120,11 +120,11 @@ function! s:suite.no_components()
call lightline#init() call lightline#init()
call lightline#colorscheme() call lightline#colorscheme()
let palette = lightline#palette() let palette = lightline#palette()
call s:assert.match(s:hi('LightLineLeft_normal_0'), s:pattern(palette.normal.left[0])) call s:assert.match(s:hi('LightlineLeft_normal_0'), s:pattern(palette.normal.left[0]))
call s:assert.match(s:hi('LightLineLeft_normal_1'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineLeft_normal_1'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineRight_normal_0'), s:pattern(palette.normal.right[0])) call s:assert.match(s:hi('LightlineRight_normal_0'), s:pattern(palette.normal.right[0]))
call s:assert.match(s:hi('LightLineRight_normal_1'), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi('LightlineRight_normal_1'), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) call s:assert.match(s:hi('LightlineMiddle_normal'), s:pattern(palette.normal.middle[0]))
endfunction endfunction
function! s:suite.subseparator() function! s:suite.subseparator()
@@ -140,9 +140,9 @@ function! s:suite.subseparator()
for i in range(4) for i in range(4)
for j in range(5) for j in range(5)
if i + 1 == j if i + 1 == j
call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', i, j)), s:pattern(get(palette.normal.left, i, palette.normal.middle[0]), get(palette.normal.left, j, palette.normal.middle[0]))) call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_%s', i, j)), s:pattern(get(palette.normal.left, i, palette.normal.middle[0]), get(palette.normal.left, j, palette.normal.middle[0])))
else else
call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', i, j)), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_%s', i, j)), 'E411: highlight group not found\|cleared')
endif endif
endfor endfor
endfor endfor
@@ -154,18 +154,18 @@ function! s:suite.component_type()
call lightline#colorscheme() call lightline#colorscheme()
let palette = lightline#palette() let palette = lightline#palette()
for type in ['error', 'warning'] for type in ['error', 'warning']
call s:assert.match(s:hi(printf('LightLineLeft_normal_%s', type)), s:pattern(palette.normal[type][0])) call s:assert.match(s:hi(printf('LightlineLeft_normal_%s', type)), s:pattern(palette.normal[type][0]))
call s:assert.match(s:hi(printf('LightLineLeft_normal_0_%s', type)), s:pattern(palette.normal.left[0], palette.normal[type][0])) call s:assert.match(s:hi(printf('LightlineLeft_normal_0_%s', type)), s:pattern(palette.normal.left[0], palette.normal[type][0]))
call s:assert.match(s:hi(printf('LightLineLeft_normal_1_%s', type)), s:pattern(palette.normal.left[1], palette.normal[type][0])) call s:assert.match(s:hi(printf('LightlineLeft_normal_1_%s', type)), s:pattern(palette.normal.left[1], palette.normal[type][0]))
call s:assert.match(s:hi(printf('LightLineLeft_normal_2_%s', type)), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi(printf('LightlineLeft_normal_2_%s', type)), 'E411: highlight group not found\|cleared')
call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_0', type)), s:pattern(palette.normal[type][0], palette.normal.left[0])) call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_0', type)), s:pattern(palette.normal[type][0], palette.normal.left[0]))
call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_1', type)), s:pattern(palette.normal[type][0], palette.normal.left[1])) call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_1', type)), s:pattern(palette.normal[type][0], palette.normal.left[1]))
call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_2', type)), s:pattern(palette.normal[type][0], palette.normal.middle[0])) call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_2', type)), s:pattern(palette.normal[type][0], palette.normal.middle[0]))
call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_3', type)), 'E411: highlight group not found\|cleared') call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_3', type)), 'E411: highlight group not found\|cleared')
endfor endfor
for type1 in ['error', 'warning'] for type1 in ['error', 'warning']
for type2 in ['error', 'warning'] for type2 in ['error', 'warning']
call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', type1, type2)), s:pattern(palette.normal[type1][0], palette.normal[type2][0])) call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_%s', type1, type2)), s:pattern(palette.normal[type1][0], palette.normal[type2][0]))
endfor endfor
endfor endfor
endfunction endfunction

View File

@@ -17,50 +17,50 @@ endfunction
function! s:suite.link() function! s:suite.link()
call lightline#link() call lightline#link()
call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_normal_0') call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_normal_0')
call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_normal_1') call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_normal_1')
call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_normal_0') call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_normal_0')
call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_normal_1') call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_normal_1')
call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_normal_2') call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_normal_2')
call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_normal') call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_normal')
endfunction endfunction
function! s:suite.insert() function! s:suite.insert()
call lightline#link('i') call lightline#link('i')
call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_insert_0') call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_insert_0')
call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_insert_1') call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_insert_1')
call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_insert_0') call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_insert_0')
call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_insert_1') call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_insert_1')
call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_insert_2') call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_insert_2')
call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_insert') call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_insert')
endfunction endfunction
function! s:suite.visual() function! s:suite.visual()
call lightline#link('v') call lightline#link('v')
call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_visual_0') call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_visual_0')
call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_visual_1') call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_visual_1')
call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_visual_0') call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_visual_0')
call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_visual_1') call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_visual_1')
call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_visual_2') call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_visual_2')
call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_visual') call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_visual')
endfunction endfunction
function! s:suite.replace() function! s:suite.replace()
call lightline#link('R') call lightline#link('R')
call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_replace_0') call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_replace_0')
call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_replace_1') call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_replace_1')
call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_replace_0') call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_replace_0')
call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_replace_1') call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_replace_1')
call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_replace_2') call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_replace_2')
call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_replace') call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_replace')
endfunction endfunction
function! s:suite.left_right() function! s:suite.left_right()
@@ -73,18 +73,18 @@ function! s:suite.left_right()
call lightline#init() call lightline#init()
call lightline#colorscheme() call lightline#colorscheme()
call lightline#link() call lightline#link()
call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_normal_0') call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_normal_0')
call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_normal_1') call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_normal_1')
call s:assert.match(s:hi('LightLineLeft_active_2'), 'LightLineLeft_normal_2') call s:assert.match(s:hi('LightlineLeft_active_2'), 'LightlineLeft_normal_2')
call s:assert.match(s:hi('LightLineLeft_active_3'), 'LightLineLeft_normal_3') call s:assert.match(s:hi('LightlineLeft_active_3'), 'LightlineLeft_normal_3')
call s:assert.match(s:hi('LightLineLeft_active_4'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineLeft_active_4'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_normal_0') call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_normal_0')
call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_normal_1') call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_normal_1')
call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_normal_2') call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_normal_2')
call s:assert.match(s:hi('LightLineRight_active_3'), 'LightLineRight_normal_3') call s:assert.match(s:hi('LightlineRight_active_3'), 'LightlineRight_normal_3')
call s:assert.match(s:hi('LightLineRight_active_4'), 'LightLineRight_normal_4') call s:assert.match(s:hi('LightlineRight_active_4'), 'LightlineRight_normal_4')
call s:assert.match(s:hi('LightLineRight_active_5'), 'E411: highlight group not found') call s:assert.match(s:hi('LightlineRight_active_5'), 'E411: highlight group not found')
call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_normal') call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_normal')
endfunction endfunction
function! s:suite.subseparator() function! s:suite.subseparator()
@@ -100,9 +100,9 @@ function! s:suite.subseparator()
for i in range(4) for i in range(4)
for j in range(5) for j in range(5)
if i + 1 == j if i + 1 == j
call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', i, j)), printf('LightLineLeft_normal_%s_%s', i, j)) call s:assert.match(s:hi(printf('LightlineLeft_active_%s_%s', i, j)), printf('LightlineLeft_normal_%s_%s', i, j))
else else
call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', i, j)), 'E411: highlight group not found') call s:assert.match(s:hi(printf('LightlineLeft_active_%s_%s', i, j)), 'E411: highlight group not found')
endif endif
endfor endfor
endfor endfor
@@ -114,18 +114,18 @@ function! s:suite.component_type()
call lightline#colorscheme() call lightline#colorscheme()
call lightline#link() call lightline#link()
for type in ['error', 'warning'] for type in ['error', 'warning']
call s:assert.match(s:hi(printf('LightLineLeft_active_%s', type)), printf('LightLineLeft_normal_%s', type)) call s:assert.match(s:hi(printf('LightlineLeft_active_%s', type)), printf('LightlineLeft_normal_%s', type))
call s:assert.match(s:hi(printf('LightLineLeft_active_0_%s', type)), printf('LightLineLeft_normal_0_%s', type)) call s:assert.match(s:hi(printf('LightlineLeft_active_0_%s', type)), printf('LightlineLeft_normal_0_%s', type))
call s:assert.match(s:hi(printf('LightLineLeft_active_1_%s', type)), printf('LightLineLeft_normal_1_%s', type)) call s:assert.match(s:hi(printf('LightlineLeft_active_1_%s', type)), printf('LightlineLeft_normal_1_%s', type))
call s:assert.match(s:hi(printf('LightLineLeft_active_2_%s', type)), 'E411: highlight group not found') call s:assert.match(s:hi(printf('LightlineLeft_active_2_%s', type)), 'E411: highlight group not found')
call s:assert.match(s:hi(printf('LightLineLeft_active_%s_0', type)), printf('LightLineLeft_normal_%s_0', type)) call s:assert.match(s:hi(printf('LightlineLeft_active_%s_0', type)), printf('LightlineLeft_normal_%s_0', type))
call s:assert.match(s:hi(printf('LightLineLeft_active_%s_1', type)), printf('LightLineLeft_normal_%s_1', type)) call s:assert.match(s:hi(printf('LightlineLeft_active_%s_1', type)), printf('LightlineLeft_normal_%s_1', type))
call s:assert.match(s:hi(printf('LightLineLeft_active_%s_2', type)), printf('LightLineLeft_normal_%s_2', type)) call s:assert.match(s:hi(printf('LightlineLeft_active_%s_2', type)), printf('LightlineLeft_normal_%s_2', type))
call s:assert.match(s:hi(printf('LightLineLeft_active_%s_3', type)), 'E411: highlight group not found') call s:assert.match(s:hi(printf('LightlineLeft_active_%s_3', type)), 'E411: highlight group not found')
endfor endfor
for type1 in ['error', 'warning'] for type1 in ['error', 'warning']
for type2 in ['error', 'warning'] for type2 in ['error', 'warning']
call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', type1, type2)), printf('LightLineLeft_normal_%s_%s', type1, type2)) call s:assert.match(s:hi(printf('LightlineLeft_active_%s_%s', type1, type2)), printf('LightlineLeft_normal_%s_%s', type1, type2))
endfor endfor
endfor endfor
endfunction endfunction