diff options
author | w0rp <devw0rp@gmail.com> | 2017-07-23 00:39:59 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-07-23 00:39:59 +0100 |
commit | a0059cfe0362e8ba55bad1f4fa8a310c74b55280 (patch) | |
tree | c13808d76e45d57318d721823bd5cceca57765be /test/handler | |
parent | 12217480f9c3143fa3d4055067048c141e009c0e (diff) | |
download | ale-a0059cfe0362e8ba55bad1f4fa8a310c74b55280.zip |
Fix #795 - Handle GCC errors without column numbers
Diffstat (limited to 'test/handler')
-rw-r--r-- | test/handler/test_gcc_handler.vader | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/handler/test_gcc_handler.vader b/test/handler/test_gcc_handler.vader index 72b7c541..2f60390c 100644 --- a/test/handler/test_gcc_handler.vader +++ b/test/handler/test_gcc_handler.vader @@ -94,3 +94,42 @@ Execute(The GCC handler shouldn't complain about #pragma once for headers): \ ale#handlers#gcc#HandleGCCFormat(347, [ \ '<stdin>:1:1: warning: #pragma once in main file [enabled by default]', \ ]) + +Execute(The GCC handler should handle syntax errors): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 12, + \ 'type': 'E', + \ 'text': 'invalid suffix "p" on integer constant' + \ }, + \ { + \ 'lnum': 17, + \ 'col': 5, + \ 'type': 'E', + \ 'text': 'invalid suffix "n" on integer constant' + \ }, + \ { + \ 'lnum': 4, + \ 'type': 'E', + \ 'text': 'variable or field ''foo'' declared void' + \ }, + \ { + \ 'lnum': 4, + \ 'type': 'E', + \ 'text': '''cat'' was not declared in this scope' + \ }, + \ { + \ 'lnum': 12, + \ 'type': 'E', + \ 'text': 'expected '';'' before ''o''' + \ }, + \ ], + \ ale#handlers#gcc#HandleGCCFormat(347, [ + \ '<stdin>:6:12: error: invalid suffix "p" on integer constant', + \ '<stdin>:17:5: error: invalid suffix "n" on integer constant', + \ '<stdin>:4: error: variable or field ''foo'' declared void', + \ '<stdin>:4: error: ''cat'' was not declared in this scope', + \ '<stdin>:12: error: expected `;'' before ''o''', + \ ]) |