summaryrefslogtreecommitdiff
path: root/test/handler/test_nim_handler.vader
blob: c9a1b7152147908c37c965a3dffcbdbb6e08c665 (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
Execute(Parsing nim errors should work):
  runtime ale_linters/nim/nimcheck.vim
  silent file foobar.nim

  AssertEqual
  \ [
  \   {
  \     'lnum': 8,
  \     'col': 8,
  \     'text': 'Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
  \     'type': 'W',
  \   },
  \   {
  \     'lnum': 12,
  \     'col': 2,
  \     'text': 'Error: identifier expected, but found ''a.barfoo''',
  \     'type': 'E',
  \   },
  \   {
  \     'lnum': 2,
  \     'col': 5,
  \     'text': 'Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
  \     'type': 'W',
  \   },
  \   {
  \     'lnum': 12,
  \     'col': 2,
  \     'text': 'Error: with : character',
  \     'type': 'E',
  \   },
  \ ],
  \ ale_linters#nim#nimcheck#Handle(bufnr(''), [
  \ 'Line with wrong( format)',
  \ 'foobar.nim(8, 8) Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
  \ 'foobar.nim(12, 2) Error: identifier expected, but found ''a.barfoo''',
  \ '/nested/folder/foobar.nim(2, 5) Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
  \ 'foobar.nim(12, 2) Error: with : character',
  \ ])