summaryrefslogtreecommitdiff
path: root/test/sign/test_sign_column_highlighting.vader
blob: da8bac29aa21f0e1560ef2f5b72ab75f58d85f7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Before:
  function! ParseSignColumnHighlight() abort
    redir => l:output
      silent highlight SignColumn
    redir end

    return join(split(l:output)[2:])
  endfunction

  let g:sign_highlight = ParseSignColumnHighlight()

After:
  delfunction ParseSignColumnHighlight
  execute 'highlight SignColumn ' .  g:sign_highlight
  unlet! g:sign_highlight

Execute(The SignColumn highlight should be set and reset):
  call ale#sign#SetSignColumnHighlight(1)
  AssertEqual 'links to ALESignColumnWithErrors', ParseSignColumnHighlight()

  call ale#sign#SetSignColumnHighlight(0)
  AssertEqual 'links to ALESignColumnWithoutErrors', ParseSignColumnHighlight()