aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/lightline.vim/test/toggle.vim
blob: c6042a86f4c461946e82ac7c883042c24970508e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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)
  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)
  call s:assert.equals(&tabline, '')
  call lightline#enable()
  call s:assert.equals(exists('#lightline'), 1)
  call s:assert.equals(exists('#lightline-disable'), 0)
  call s:assert.not_equals(&tabline, '')
endfunction

function! s:suite.toggle()
  call lightline#toggle()
  call s:assert.equals(exists('#lightline'), 0)
  call s:assert.equals(exists('#lightline-disable'), 1)
  call s:assert.equals(&tabline, '')
  call lightline#toggle()
  call s:assert.equals(exists('#lightline'), 1)
  call s:assert.equals(exists('#lightline-disable'), 0)
  call s:assert.not_equals(&tabline, '')
endfunction