mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-24 18:49:27 +08:00
#392 Report errors inside of headers, in a very basic way
This commit is contained in:
68
test/handler/test_gcc_handler.vader
Normal file
68
test/handler/test_gcc_handler.vader
Normal file
@@ -0,0 +1,68 @@
|
||||
Execute(GCC errors from included files should be parsed correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 3,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'Problems were found in the header (See :ALEDetail)',
|
||||
\ 'detail': join([
|
||||
\ 'broken.h:1:1: error: expected identifier or ''('' before ''{'' token',
|
||||
\ ' {{{',
|
||||
\ ' ^',
|
||||
\ ], "\n"),
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#gcc#HandleGCCFormat(347, [
|
||||
\ 'In file included from <stdin>:3:0:',
|
||||
\ 'broken.h:1:1: error: expected identifier or ''('' before ''{'' token',
|
||||
\ ' {{{',
|
||||
\ ' ^',
|
||||
\ ])
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 3,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'Problems were found in the header (See :ALEDetail)',
|
||||
\ 'detail': join([
|
||||
\ 'b.h:1:1: error: expected identifier or ''('' before ''{'' token',
|
||||
\ ' {{{',
|
||||
\ ' ^',
|
||||
\ ], "\n"),
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#gcc#HandleGCCFormat(347, [
|
||||
\ 'In file included from a.h:1:0,',
|
||||
\ ' from test.c:3:',
|
||||
\ 'b.h:1:1: error: expected identifier or ''('' before ''{'' token',
|
||||
\ ' {{{',
|
||||
\ ' ^',
|
||||
\ ])
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 3,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'Problems were found in the header (See :ALEDetail)',
|
||||
\ 'detail': join([
|
||||
\ 'b.h:1:1: error: unknown type name ‘bad_type’',
|
||||
\ ' bad_type x;',
|
||||
\ ' ^',
|
||||
\ 'b.h:2:1: error: unknown type name ‘other_bad_type’',
|
||||
\ ' other_bad_type y;',
|
||||
\ ' ^',
|
||||
\ ], "\n"),
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#gcc#HandleGCCFormat(347, [
|
||||
\ 'In file included from a.h:1:0,',
|
||||
\ ' from test.c:3:',
|
||||
\ 'b.h:1:1: error: unknown type name ‘bad_type’',
|
||||
\ ' bad_type x;',
|
||||
\ ' ^',
|
||||
\ 'b.h:2:1: error: unknown type name ‘other_bad_type’',
|
||||
\ ' other_bad_type y;',
|
||||
\ ' ^',
|
||||
\ ])
|
||||
Reference in New Issue
Block a user