From a0059cfe0362e8ba55bad1f4fa8a310c74b55280 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 23 Jul 2017 00:39:59 +0100 Subject: Fix #795 - Handle GCC errors without column numbers --- test/handler/test_gcc_handler.vader | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'test/handler') 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, [ \ ':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, [ + \ ':6:12: error: invalid suffix "p" on integer constant', + \ ':17:5: error: invalid suffix "n" on integer constant', + \ ':4: error: variable or field ''foo'' declared void', + \ ':4: error: ''cat'' was not declared in this scope', + \ ':12: error: expected `;'' before ''o''', + \ ]) -- cgit v1.2.3