aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/lightline.vim/test/error.vim
blob: 8fdabf466fac4ef3d328080055665f8ffb747671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
let s:suite = themis#suite('error')
let s:assert = themis#helper('assert')

function! s:message() abort
  redir => messages
    silent! messages
  redir END
  return split(messages, '\n')[-1]
endfunction

function! s:suite.error()
  let message = 'An error occurred.'
  call lightline#error(message)
  call s:assert.equals(s:message(), 'lightline.vim: ' . message)
endfunction