forked from qt-creator/qt-creator
AutoTest: Fix handling of test cases with comma
Fixes: QTCREATORBUG-27705 Change-Id: I6e22df4e401dc52e8d8599cc8b4de16200093b03 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -98,7 +98,7 @@ QStringList CatchConfiguration::argumentsForTestRunner(QStringList *omitted) con
|
|||||||
{
|
{
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
if (testCaseCount())
|
if (testCaseCount())
|
||||||
arguments << "\"" + testCases().join("\",\"") + "\"";
|
arguments << "\"" + testCases().join("\", \"") + "\"";
|
||||||
arguments << "--reporter" << "xml";
|
arguments << "--reporter" << "xml";
|
||||||
|
|
||||||
if (AutotestPlugin::settings()->processArgs) {
|
if (AutotestPlugin::settings()->processArgs) {
|
||||||
|
@@ -37,7 +37,9 @@ namespace Internal {
|
|||||||
|
|
||||||
QString CatchTreeItem::testCasesString() const
|
QString CatchTreeItem::testCasesString() const
|
||||||
{
|
{
|
||||||
return m_state & CatchTreeItem::Parameterized ? QString(name() + " -*") : name();
|
QString testcase = m_state & CatchTreeItem::Parameterized ? QString(name() + " -*") : name();
|
||||||
|
// mask comma if it is part of the test case name
|
||||||
|
return testcase.replace(',', "\\,");
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString nonRootDisplayName(const CatchTreeItem *it)
|
static QString nonRootDisplayName(const CatchTreeItem *it)
|
||||||
|
Reference in New Issue
Block a user