Remove redundant code for the GCC handler, and fix bugs with errors for - not being parsed

This commit is contained in:
w0rp
2017-10-26 00:09:26 +01:00
parent da365134b5
commit 2f5b94e07d
2 changed files with 58 additions and 79 deletions

View File

@@ -1,3 +1,12 @@
Execute(The GCC handler should ignore other lines of output):
AssertEqual
\ [],
\ ale#handlers#gcc#HandleGCCFormat(347, [
\ 'foo',
\ 'bar',
\ 'baz',
\ ])
Execute(GCC errors from included files should be parsed correctly):
AssertEqual
\ [
@@ -136,3 +145,17 @@ Execute(The GCC handler should handle notes with no previous message):
\ '<stdin>:1:1: note: x',
\ '<stdin>:1:1: note: x',
\ ])
Execute(The GCC handler should interpret - as being the current file):
AssertEqual
\ [
\ {
\ 'lnum': 6,
\ 'col': 12,
\ 'type': 'E',
\ 'text': 'Some error',
\ },
\ ],
\ ale#handlers#gcc#HandleGCCFormat(347, [
\ '-:6:12: error: Some error',
\ ])