summaryrefslogtreecommitdiff
path: root/test/handler/test_ghc_handler.vader
blob: e8d622bbfc5c97085371b3f28533d9d4dafb6d04 (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
55
56
57
Execute(The ghc handler should handle hdevtools output):
  AssertEqual
  \ [
  \   {
  \     'lnum': 147,
  \     'type': 'W',
  \     'col': 62,
  \     'text': '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’ Expected type: [T.Text]',
  \   },
  \ ],
  \ ale#handlers#haskell#HandleGHCFormat(12, [
  \ '/path/to/foo.hs:147:62: warning:',
  \ '• Couldnt match type ‘a -> T.Text’ with ‘T.Text’',
  \ '  Expected type: [T.Text]',
  \ ])

Execute(The ghc handler should handle ghc 8 output):
  AssertEqual
  \ [
  \   {
  \     'lnum': 6,
  \     'type': 'E',
  \     'col': 1,
  \     'text': ' Failed to load interface for ‘GitHub.Data’ Use -v to see a list of the files searched for.',
  \   },
  \   {
  \     'lnum': 7,
  \     'type': 'W',
  \     'col': 1,
  \     'text': ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’ Use -v to see a list of the files searched for.',
  \   },
  \ ],
  \ ale#handlers#haskell#HandleGHCFormat(47, [
  \ '',
  \ 'src/Appoint/Lib.hs:6:1: error:',
  \ '    Failed to load interface for ‘GitHub.Data’',
  \ '    Use -v to see a list of the files searched for.',
  \ '',
  \ 'src/Appoint/Lib.hs:7:1: warning:',
  \ '    Failed to load interface for ‘GitHub.Endpoints.PullRequests’',
  \ '    Use -v to see a list of the files searched for.',
  \ ])

Execute(The ghc handler should handle ghc 7 output):
  AssertEqual
  \ [
  \   {
  \     'lnum': 168,
  \     'type': 'E',
  \     'col': 1,
  \     'text': ' parse error (possibly incorrect indentation or mismatched brackets)',
  \   },
  \ ],
  \ ale#handlers#haskell#HandleGHCFormat(47, [
  \ 'src/Main.hs:168:1:',
  \ '    parse error (possibly incorrect indentation or mismatched brackets)',
  \ ])