add more tests for s:subseparator

This commit is contained in:
itchyny
2016-04-14 00:18:23 +09:00
parent 00346c27c0
commit d09e0d2099

View File

@@ -41,6 +41,18 @@ function! s:suite.subseparator_component_visible_condition_5()
call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '') call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '')
endfunction endfunction
function! s:suite.subseparator_component_visible_condition_6()
let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '1||0', 'custom2': '0', 'custom3': '0' } }
call lightline#init()
call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '')
endfunction
function! s:suite.subseparator_component_visible_condition_7()
let g:lightline = { 'component': { 'custom1': 'custom1', 'custom2': 'custom2', 'custom3': 'custom3' }, 'component_visible_condition': { 'custom1': '1||1', 'custom2': '0', 'custom3': '0' } }
call lightline#init()
call s:assert.equals(s:subseparator(['custom1', 'custom2', 'custom3'], '|', [0, 0, 0]), '')
endfunction
function! s:suite.subseparator_component_function() function! s:suite.subseparator_component_function()
function! Custom1() function! Custom1()
return 'custom1' return 'custom1'