summaryrefslogtreecommitdiff
path: root/test/handler/test_javac_handler.vader
blob: d190ab78699c1873d6f915e5b3f1715837ca74b6 (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/java/javac.vim

After:
  call ale#linter#Reset()

Execute(The javac handler should handle cannot find symbol errors):
  AssertEqual
  \ [
  \   {
  \     'lnum': 1,
  \     'text': 'error: some error',
  \     'type': 'E',
  \   },
  \   {
  \     'lnum': 2,
  \     'text': 'error: cannot find symbol: BadName',
  \     'type': 'E',
  \   },
  \   {
  \     'lnum': 34,
  \     'text': 'error: cannot find symbol: BadName2',
  \     'type': 'E',
  \   },
  \   {
  \     'lnum': 37,
  \     'text': 'warning: some warning',
  \     'type': 'W',
  \   },
  \   {
  \     'lnum': 42,
  \     'text': 'error: cannot find symbol: bar()',
  \     'type': 'E',
  \   },
  \ ],
  \ ale_linters#java#javac#Handle(347, [
  \   '/tmp/vLPr4Q5/33/foo.java:1: error: some error',
  \   '/tmp/vLPr4Q5/33/foo.java:2: error: cannot find symbol',
  \   '    BadName foo() {',
  \   '    ^',
  \   '  symbol:   class BadName',
  \   '  location: class Bar',
  \   '/tmp/vLPr4Q5/33/foo.java:34: error: cannot find symbol',
  \   '    BadName2 foo() {',
  \   '    ^',
  \   '  symbol:   class BadName2',
  \   '  location: class Bar',
  \   '/tmp/vLPr4Q5/33/foo.java:37: warning: some warning',
  \   '/tmp/vLPr4Q5/264/foo.java:42: error: cannot find symbol',
  \   '      this.bar();',
  \   '          ^',
  \   '  symbol: method bar()',
  \   '5 errors',
  \ ])