Skip to content

Commit

Permalink
s/statusline/tabline/
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa committed Apr 10, 2016
1 parent 33b16cf commit 2ec88af
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/testdir/test_tabline.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function! TablineWithCaughtError()
let s:func_in_statusline_called = 1
let s:func_in_tabline_called = 1
try
call eval('unknown expression')
catch
Expand All @@ -8,35 +8,35 @@ function! TablineWithCaughtError()
endfunction

function! TablineWithError()
let s:func_in_statusline_called = 1
let s:func_in_tabline_called = 1
call eval('unknown expression')
return ''
endfunction

function! Test_caught_error_in_statusline()
function! Test_caught_error_in_tabline()
let showtabline_save = &showtabline
set showtabline=2
let s:func_in_statusline_called = 0
let s:func_in_tabline_called = 0
let tabline = '%{TablineWithCaughtError()}'
let &tabline = tabline
redraw!
call assert_true(s:func_in_statusline_called)
call assert_true(s:func_in_tabline_called)
call assert_equal(tabline, &tabline)
set tabline=
let &showtabline = showtabline_save
endfunction

function! Test_statusline_will_be_disabled_with_error()
function! Test_tabline_will_be_disabled_with_error()
let showtabline_save = &showtabline
set showtabline=2
let s:func_in_statusline_called = 0
let s:func_in_tabline_called = 0
let tabline = '%{TablineWithError()}'
try
let &tabline = tabline
redraw!
catch
endtry
call assert_true(s:func_in_statusline_called)
call assert_true(s:func_in_tabline_called)
call assert_equal('', &tabline)
set tabline=
let &showtabline = showtabline_save
Expand Down

0 comments on commit 2ec88af

Please sign in to comment.