/ test / handler / test_sqlint_handler.vader
test_sqlint_handler.vader
 1  Before:
 2    runtime! ale_linters/sql/sqlint.vim
 3  
 4  After:
 5    call ale#linter#Reset()
 6  
 7  Execute(The sqlint handler should parse lines correctly):
 8    AssertEqual
 9    \ [
10    \   {
11    \     'lnum': 3,
12    \     'col': 1,
13    \     'text': 'syntax error at or near "WIBBLE"',
14    \     'type': 'E',
15    \   },
16    \   {
17    \     'lnum': 47,
18    \     'col': 11,
19    \     'text': 'unterminated quoted string at or near "''',
20    \     'type': 'E',
21    \   },
22    \   {
23    \     'lnum': 50,
24    \     'col': 12,
25    \     'text': 'some warning at end of input',
26    \     'type': 'W',
27    \   },
28    \ ],
29    \ ale_linters#sql#sqlint#Handle(347, [
30    \   'This line should be ignored completely',
31    \   'stdin:3:1:ERROR syntax error at or near "WIBBLE"',
32    \   'stdin:47:11:ERROR unterminated quoted string at or near "''',
33    \   'stdin:50:12:WARNING some warning at end of input',
34    \ ])