diff options
-rw-r--r-- | src/plugins/baremetal/sdccparser.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/baremetal/sdccparser.cpp b/src/plugins/baremetal/sdccparser.cpp index c7c436422a..57a8606d5c 100644 --- a/src/plugins/baremetal/sdccparser.cpp +++ b/src/plugins/baremetal/sdccparser.cpp @@ -110,7 +110,7 @@ void SdccParser::stdError(const QString &line) return; } - re.setPattern("^(.+\\.\\S+):(\\d+): (Error|syntax error): (.+)$"); + re.setPattern("^(.+\\.\\S+):(\\d+): (Error|error|syntax error): (.+)$"); match = re.match(lne); if (match.hasMatch()) { enum CaptureIndex { FilePathIndex = 1, LineNumberIndex, @@ -250,6 +250,18 @@ void BareMetalPlugin::testSdccOutputParsers_data() categoryCompile)) << QString(); + QTest::newRow("Compiler simple single line error") + << QString::fromLatin1("c:\\foo\\main.c:63: error: Some error") + << OutputParserTester::STDERR + << QString() + << QString::fromLatin1("c:\\foo\\main.c:63: error: Some error\n") + << (Tasks() << Task(Task::Error, + QLatin1String("Some error"), + Utils::FilePath::fromUserInput(QLatin1String("c:\\foo\\main.c")), + 63, + categoryCompile)) + << QString(); + QTest::newRow("Compiler single line error") << QString::fromLatin1("c:\\foo\\main.c:63: error 123: Some error") << OutputParserTester::STDERR |