summaryrefslogtreecommitdiff
path: root/test/handler/test_ghc_mod_handler.vader
blob: 53991bb6220a861cc1255195678fc96c34fd8c07 (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
Execute(HandleGhcFormat should handle ghc-mod problems):
  call ale#test#SetFilename('check2.hs')

  AssertEqual
  \ [
  \   {
  \     'lnum': 2,
  \     'col': 1,
  \     'type': 'E',
  \     'text': 'Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.',
  \   },
  \   {
  \     'lnum': 2,
  \     'col': 1,
  \     'type': 'E',
  \     'text': ' Suggestion: Use camelCaseFound:  my_variable = ...Why not:  myVariable = ...',
  \   },
  \   {
  \     'lnum': 6,
  \     'col': 1,
  \     'type': 'E',
  \     'text': ' Warning: Eta reduceFound:  myFunc x = succ xWhy not:  myFunc = succ',
  \   },
  \ ],
  \ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
  \   'check2.hs:2:1:Failed to load interface for ‘Missing’Use -v to see a list of the files searched for.',
  \   'check2.hs:2:1: Suggestion: Use camelCaseFound:  my_variable = ...Why not:  myVariable = ...',
  \   'check2.hs:6:1: Warning: Eta reduceFound:  myFunc x = succ xWhy not:  myFunc = succ',
  \   'xxx.hs:6:1: Warning: Eta reduceFound:  myFunc x = succ xWhy not:  myFunc = succ',
  \ ])