1
0
Fork 0
mirror of synced 2024-11-14 05:08:56 -05:00
ultimate-vim/sources_non_forked/lightline.vim/test/toggle.vim

52 lines
1.6 KiB
VimL
Raw Normal View History

let s:suite = themis#suite('toggle')
let s:assert = themis#helper('assert')
function! s:suite.before_each()
let g:lightline = {}
call lightline#init()
tabnew
tabonly
endfunction
function! s:suite.default()
call s:assert.equals(exists('#lightline'), 1)
call s:assert.equals(exists('#lightline-disable'), 0)
2018-12-17 06:28:27 -05:00
call s:assert.not_equals(&statusline, '')
call s:assert.not_equals(&tabline, '')
endfunction
function! s:suite.disable_enable()
call lightline#disable()
call s:assert.equals(exists('#lightline'), 0)
call s:assert.equals(exists('#lightline-disable'), 1)
2018-12-17 06:28:27 -05:00
call s:assert.equals(&statusline, '')
call s:assert.equals(&tabline, '')
call lightline#update()
call s:assert.equals(&statusline, '')
call s:assert.equals(&tabline, '')
call lightline#enable()
call s:assert.equals(exists('#lightline'), 1)
call s:assert.equals(exists('#lightline-disable'), 0)
2018-12-17 06:28:27 -05:00
call s:assert.not_equals(&statusline, '')
call s:assert.not_equals(&tabline, '')
2020-12-04 16:15:32 -05:00
call lightline#disable()
call lightline#disable()
call lightline#enable()
call lightline#enable()
call s:assert.equals(exists('#lightline'), 1)
call s:assert.equals(exists('#lightline-disable'), 0)
endfunction
function! s:suite.toggle()
call lightline#toggle()
call s:assert.equals(exists('#lightline'), 0)
call s:assert.equals(exists('#lightline-disable'), 1)
2018-12-17 06:28:27 -05:00
call s:assert.equals(&statusline, '')
call s:assert.equals(&tabline, '')
call lightline#toggle()
call s:assert.equals(exists('#lightline'), 1)
call s:assert.equals(exists('#lightline-disable'), 0)
2018-12-17 06:28:27 -05:00
call s:assert.not_equals(&statusline, '')
call s:assert.not_equals(&tabline, '')
endfunction