diff options
author | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:11:56 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:11:56 +0200 |
commit | 9931e0888b2419326ae10ebbfae532261c5c125f (patch) | |
tree | 7504be5daccbb7b7d1ea396754de47b11ed790e5 /vim/bundle/lightline.vim/test/highlight.vim | |
parent | e573b3020c032400eed60b649a2cbf55266e6bb0 (diff) | |
download | myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.gz myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.bz2 myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.zip |
Fix submodules
Diffstat (limited to 'vim/bundle/lightline.vim/test/highlight.vim')
m--------- | vim/bundle/lightline.vim | 0 | ||||
-rw-r--r-- | vim/bundle/lightline.vim/test/highlight.vim | 171 |
2 files changed, 0 insertions, 171 deletions
diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim new file mode 160000 +Subproject 430ce2cb063b39a0c7950cafd617e333acb6759 diff --git a/vim/bundle/lightline.vim/test/highlight.vim b/vim/bundle/lightline.vim/test/highlight.vim deleted file mode 100644 index fe5182a..0000000 --- a/vim/bundle/lightline.vim/test/highlight.vim +++ /dev/null @@ -1,171 +0,0 @@ -let s:suite = themis#suite('highlight') -let s:assert = themis#helper('assert') - -function! s:suite.before_each() - hi clear -endfunction - -function! s:hi(name) - redir => hi - silent! exec 'hi' a:name - redir END - return substitute(join(split(hi, "\n"), ''), ' \+', ' ', 'g') -endfunction - -function! s:pattern(xs, ...) abort - let ys = a:0 ? a:xs[1:] : a:xs - let zs = get(a:000, 0, a:xs) - return 'ctermfg=' . ys[2] . ' ctermbg=' . zs[3] . '.*guifg=' . ys[0] . ' guibg=' . zs[1] -endfunction - -function! s:suite.highlight() - let g:lightline = {} - call lightline#init() - call lightline#colorscheme() - 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_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('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_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('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) -endfunction - -function! s:suite.insert() - let g:lightline = {} - call lightline#init() - call lightline#colorscheme() - call lightline#highlight('insert') - 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_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('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_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('LightLineMiddle_insert'), s:pattern(palette.insert.middle[0])) -endfunction - - -function! s:suite.visual() - let g:lightline = {} - call lightline#init() - call lightline#colorscheme() - call lightline#highlight('visual') - 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_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('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_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('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) -endfunction - -function! s:suite.replace() - let g:lightline = {} - call lightline#init() - call lightline#colorscheme() - call lightline#highlight('replace') - 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_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('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_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('LightLineMiddle_replace'), s:pattern(palette.replace.middle[0])) -endfunction - -function! s:suite.left_right() - let g:lightline = { - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], [ 'readonly' ], [ 'filename' ], [ 'modified' ] ], - \ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat' ], [ 'fileencoding' ], [ 'filetype' ] ] - \ }, - \ } - call lightline#init() - call lightline#colorscheme() - 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_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_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('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_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_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('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) -endfunction - -function! s:suite.no_components() - let g:lightline = { - \ 'active': { - \ 'left': [], - \ 'right': [] - \ }, - \ 'inactive': { - \ 'left': [], - \ 'right': [] - \ }, - \ } - call lightline#init() - call lightline#colorscheme() - 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_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_1'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) -endfunction - -function! s:suite.subseparator() - let g:lightline = { - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], [ 'readonly' ], [ 'filename' ], [ 'modified' ] ], - \ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat' ], [ 'fileencoding' ], [ 'filetype' ] ] - \ }, - \ } - call lightline#init() - call lightline#colorscheme() - let palette = lightline#palette() - for i in range(4) - for j in range(5) - 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]))) - else - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', i, j)), 'E411: highlight group not found\|cleared') - endif - endfor - endfor -endfunction - -function! s:suite.component_type() - let g:lightline = { 'component_type': { 'error': 'error', 'warning': 'warning' } } - call lightline#init() - call lightline#colorscheme() - let palette = lightline#palette() - 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_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_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_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_3', type)), 'E411: highlight group not found\|cleared') - endfor - for type1 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])) - endfor - endfor -endfunction |