/ test / handler / test_appleswiftformat_handler.vader
test_appleswiftformat_handler.vader
 1  Before:
 2    runtime ale_linters/swift/appleswiftformat.vim
 3  
 4  After:
 5    call ale#linter#Reset()
 6  
 7  Execute(The appleswiftformat handler should parse lines correctly):
 8    AssertEqual
 9    \ [
10    \   {
11    \     'lnum': 4,
12    \     'col': 21,
13    \     'type': 'W',
14    \     'code': 'DoNotUseSemicolons',
15    \     'text': 'remove '';'' and move the next statement to the new line',
16    \   },
17    \   {
18    \     'lnum': 3,
19    \     'col': 12,
20    \     'type': 'W',
21    \     'code': 'Spacing',
22    \     'text': 'remove 1 space'
23    \   },
24    \ ],
25    \ ale_linters#swift#appleswiftformat#Handle(bufnr(''), [
26    \   'Sources/main.swift:4:21: warning: [DoNotUseSemicolons] remove '';'' and move the next statement to the new line',
27    \   'Sources/main.swift:3:12: warning: [Spacing] remove 1 space',
28    \ ])