summaryrefslogtreecommitdiff
path: root/test/handler/test_vala_lint_handler.vader
blob: b8a4fbfac151906601c6380736bffade7053ec96 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Before:
  runtime ale_linters/vala/vala_lint.vim

After:
  call ale#linter#Reset()

Execute(The Vala-Lint handler should parse lines correctly):
  AssertEqual
  \ [
  \   {
  \     'lnum': 18,
  \     'col': 18,
  \     'text': 'Expected space before paren',
  \     'code': 'space-before-paren',
  \     'type': 'E',
  \   },
  \   {
  \     'lnum': 64,
  \     'col': 37,
  \     'text': 'Expected space before paren',
  \     'code': 'space-before-paren',
  \     'type': 'W',
  \   },
  \   {
  \     'lnum': 73,
  \     'col': 37,
  \     'text': 'Expected space before paren',
  \     'code': 'space-before-paren',
  \     'type': 'E',
  \   },
  \ ],
  \ ale_linters#vala#vala_lint#Handle(bufnr(''), [
  \   'Application.vala',
  \   '   18.18    error   Expected space before paren                     space-before-paren',
  \   '   64.37    warn    Expected space before paren                     space-before-paren',
  \   '   73.37    error   Expected space before paren                     space-before-paren',
  \ ])

Execute(The Vala-Lint handler should ignore unknown error types):
  AssertEqual
  \ [
  \   {
  \     'lnum': 73,
  \     'col': 37,
  \     'text': 'Expected space before paren',
  \     'code': 'space-before-paren',
  \     'type': 'E',
  \   },
  \ ],
  \ ale_linters#vala#vala_lint#Handle(bufnr(''), [
  \   'Application.vala',
  \   '   18.18    test    Expected space before paren                     space-before-paren',
  \   '   73.37    error   Expected space before paren                     space-before-paren',
  \ ])