aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/lightline.vim/test/toggle.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/bundle/lightline.vim/test/toggle.vim')
-rw-r--r--vim/bundle/lightline.vim/test/toggle.vim37
1 files changed, 37 insertions, 0 deletions
diff --git a/vim/bundle/lightline.vim/test/toggle.vim b/vim/bundle/lightline.vim/test/toggle.vim
new file mode 100644
index 0000000..c6042a8
--- /dev/null
+++ b/vim/bundle/lightline.vim/test/toggle.vim
@@ -0,0 +1,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