summaryrefslogtreecommitdiff
path: root/test/handler/test_gawk_handler.vader
blob: 3a7b5457693dbfad022961cdd18951ca9003476b (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
Before:
  runtime ale_linters/awk/gawk.vim

After:
  call ale#linter#Reset()

Execute(gawk syntax errors should be parsed correctly):

  AssertEqual
  \ [
  \   {
  \     'lnum': 1,
  \     'col': 0,
  \     'text': "invalid char ''' in expression",
  \     'code': 0,
  \     'type': 'E',
  \   },
  \   {
  \     'lnum': 5,
  \     'col': 0,
  \     'text': 'unterminated string',
  \     'code': 0,
  \     'type': 'E',
  \   },
  \   {
  \     'lnum': 10,
  \     'col': 0,
  \     'text': "escape sequence `\u' treated as plain `u'",
  \     'code': 0,
  \     'type': 'W',
  \   },
  \ ],
  \ ale#handlers#gawk#HandleGawkFormat(347, [
  \   "gawk: something.awk:1: BEGIN { system('touch aaaaaaaaa') }",
  \   "gawk: something.awk:1:                ^ invalid char ''' in expression",
  \   'gawk: something.awk:5: { x = "aaaaaaaaaaa',
  \   'gawk: something.awk:5:       ^ unterminated string',
  \   "gawk: something.awk:10: warning: escape sequence `\u' treated as plain `u'",
  \ ])