summaryrefslogtreecommitdiff
path: root/test/test_balloon_messages.vader
blob: 50dc6af4b1a493e1d0040a0aa5c5f89c73316c78 (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
38
Before:
  Save g:ale_buffer_info

  let g:ale_buffer_info[347] = {'loclist': [
  \ {
  \   'lnum': 1,
  \   'col': 10,
  \   'text': 'Missing semicolon. (semi)',
  \ },
  \ {
  \   'lnum': 2,
  \   'col': 10,
  \   'text': 'Infix operators must be spaced. (space-infix-ops)'
  \ },
  \ {
  \   'lnum': 2,
  \   'col': 15,
  \   'text': 'Missing radix parameter (radix)'
  \ },
  \]}

After:
  Restore

Execute(Balloon messages should be shown for the correct lines):
  AssertEqual
  \ 'Missing semicolon. (semi)',
  \ ale#balloon#MessageForPos(347, 1, 1)

Execute(Balloon messages should be shown for earlier columns):
  AssertEqual
  \ 'Infix operators must be spaced. (space-infix-ops)',
  \ ale#balloon#MessageForPos(347, 2, 1)

Execute(Balloon messages should be shown for later columns):
  AssertEqual
  \ 'Missing radix parameter (radix)',
  \ ale#balloon#MessageForPos(347, 2, 16)