aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/lightline.vim/test/link.vim
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-06-30 16:11:56 +0200
committerKarel Kočí <cynerd@email.cz>2016-06-30 16:11:56 +0200
commit9931e0888b2419326ae10ebbfae532261c5c125f (patch)
tree7504be5daccbb7b7d1ea396754de47b11ed790e5 /vim/bundle/lightline.vim/test/link.vim
parente573b3020c032400eed60b649a2cbf55266e6bb0 (diff)
downloadmyconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.gz
myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.bz2
myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.zip
Fix submodules
Diffstat (limited to 'vim/bundle/lightline.vim/test/link.vim')
m---------vim/bundle/lightline.vim0
-rw-r--r--vim/bundle/lightline.vim/test/link.vim131
2 files changed, 0 insertions, 131 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/link.vim b/vim/bundle/lightline.vim/test/link.vim
deleted file mode 100644
index ca86753..0000000
--- a/vim/bundle/lightline.vim/test/link.vim
+++ /dev/null
@@ -1,131 +0,0 @@
-let s:suite = themis#suite('link')
-let s:assert = themis#helper('assert')
-
-function! s:suite.before_each()
- hi clear
- let g:lightline = {}
- call lightline#init()
- call lightline#colorscheme()
-endfunction
-
-function! s:hi(name)
- redir => hi
- silent! exec 'hi' a:name
- redir END
- return substitute(join(split(hi, "\n"), ''), ' \+', ' ', 'g')
-endfunction
-
-function! s:suite.link()
- call lightline#link()
- 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_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_1'), 'LightLineRight_normal_1')
- 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('LightLineMiddle_active'), 'LightLineMiddle_normal')
-endfunction
-
-function! s:suite.insert()
- call lightline#link('i')
- 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_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_1'), 'LightLineRight_insert_1')
- 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('LightLineMiddle_active'), 'LightLineMiddle_insert')
-endfunction
-
-function! s:suite.visual()
- call lightline#link('v')
- 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_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_1'), 'LightLineRight_visual_1')
- 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('LightLineMiddle_active'), 'LightLineMiddle_visual')
-endfunction
-
-function! s:suite.replace()
- call lightline#link('R')
- 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_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_1'), 'LightLineRight_replace_1')
- 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('LightLineMiddle_active'), 'LightLineMiddle_replace')
-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()
- call lightline#link()
- 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_2'), 'LightLineLeft_normal_2')
- 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('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_2'), 'LightLineRight_normal_2')
- 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_5'), 'E411: highlight group not found')
- call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_normal')
-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()
- call lightline#link()
- for i in range(4)
- for j in range(5)
- if i + 1 == j
- call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', i, j)), printf('LightLineLeft_normal_%s_%s', i, j))
- else
- call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', i, j)), 'E411: highlight group not found')
- endif
- endfor
- endfor
-endfunction
-
-function! s:suite.component_type()
- let g:lightline = { 'component_type': { 'error': 'error', 'warning': 'warning' } }
- call lightline#init()
- call lightline#colorscheme()
- call lightline#link()
- 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_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_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_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_3', type)), 'E411: highlight group not found')
- endfor
- for type1 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))
- endfor
- endfor
-endfunction