ale/test/handler/test_gcc_handler.vader

69 lines
1.8 KiB
Plaintext
Raw Normal View History

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;',
\ ' ^',
\ ])