forked from qt-creator/qt-creator
AutoTest: Fix displaying XML content
CDATA sections that have line breaks at their line ends within a multiline CDATA section should get handled that these (inner) line breaks do not get lost. This patch fixes displaying failed Qt tests when using the XML output. Change-Id: I3aa7100836613372ac5b2b409c5cfacfb34209ba Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -62,7 +62,7 @@ GTestOutputReader::GTestOutputReader(const QFutureInterface<TestResultPtr> &futu
|
||||
}
|
||||
}
|
||||
|
||||
void GTestOutputReader::processOutput(const QByteArray &outputLine)
|
||||
void GTestOutputReader::processOutput(const QByteArray &outputLineWithNewLine)
|
||||
{
|
||||
static QRegExp newTestStarts("^\\[-{10}\\] \\d+ tests? from (.*)$");
|
||||
static QRegExp testEnds("^\\[-{10}\\] \\d+ tests? from (.*) \\((.*)\\)$");
|
||||
@@ -74,7 +74,7 @@ void GTestOutputReader::processOutput(const QByteArray &outputLine)
|
||||
static QRegExp errorLocation("^(.*)\\((\\d+)\\): error:.*$");
|
||||
static QRegExp iterations("^Repeating all tests \\(iteration (\\d+)\\) \\. \\. \\.$");
|
||||
|
||||
const QString line = QString::fromLatin1(outputLine);
|
||||
const QString line = QString::fromLatin1(chopLineBreak(outputLineWithNewLine));
|
||||
if (line.trimmed().isEmpty())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user