File: test_scala_handler.vader

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (29 lines) | stat: -rw-r--r-- 772 bytes parent folder | download
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
Execute(The handler should return an empty list with empty input):
  AssertEqual [], ale#handlers#scala#HandleScalacLintFormat(bufnr(''), [])

Execute(The handler should correctly parse error messages):
  AssertEqual
  \ [
  \   {
  \     'lnum': 4,
  \     'col':  8,
  \     'text': ''':'' expected but identifier found.',
  \     'type': 'E'
  \   },
  \   {
  \     'lnum': 6,
  \     'col':  2,
  \     'text': 'identifier expected but eof found.',
  \     'type': 'E'
  \   }
  \ ],
  \ ale#handlers#scala#HandleScalacLintFormat(bufnr(''),
  \ [
  \ "hi.scala:4: error: ':' expected but identifier found.",
  \ "  Some stupid scala code",
  \ "       ^",
  \ "hi.scala:6: error: identifier expected but eof found.",
  \ ")",
  \ " ^",
  \ "two errors found",
  \ ])