diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-10-20 13:42:50 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-10-25 08:58:20 +0000 |
commit | 05b22932560a0e04b8135a1ac32940fe0bfc9f26 (patch) | |
tree | 1e7bb5318ab1f7eea9f11dfbbd3ba2af1885265b /tests | |
parent | 44ab895102034e7c88a1adcb8abeb6d7b83813e0 (diff) | |
download | qttools-05b22932560a0e04b8135a1ac32940fe0bfc9f26.tar.gz |
fix test execution in dirs with spaces
Change-Id: Ib99cf27f50f32eb23d278f5b9a9c279d10da4ece
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/linguist/lrelease/tst_lrelease.cpp | 10 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/tst_lupdate.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/linguist/lrelease/tst_lrelease.cpp b/tests/auto/linguist/lrelease/tst_lrelease.cpp index 96f0d933f..6d39fe252 100644 --- a/tests/auto/linguist/lrelease/tst_lrelease.cpp +++ b/tests/auto/linguist/lrelease/tst_lrelease.cpp @@ -114,7 +114,7 @@ void tst_lrelease::doCompare(const QStringList &actual, const QString &expectedF void tst_lrelease::translate() { - QVERIFY(!QProcess::execute(lrelease + " " + dataDir + "translate.ts")); + QVERIFY(!QProcess::execute(lrelease, QStringList() << (dataDir + "translate.ts"))); QTranslator translator; QVERIFY(translator.load(dataDir + "translate.qm")); @@ -164,7 +164,7 @@ void tst_lrelease::translate() void tst_lrelease::compressed() { - QVERIFY(!QProcess::execute(lrelease + " -compress " + dataDir + "compressed.ts")); + QVERIFY(!QProcess::execute(lrelease, QStringList() << "-compress" << (dataDir + "compressed.ts"))); QTranslator translator; QVERIFY(translator.load(dataDir + "compressed.qm")); @@ -181,7 +181,7 @@ void tst_lrelease::compressed() void tst_lrelease::idbased() { - QVERIFY(!QProcess::execute(lrelease + " -idbased " + dataDir + "idbased.ts")); + QVERIFY(!QProcess::execute(lrelease, QStringList() << "-idbased" << (dataDir + "idbased.ts"))); QTranslator translator; QVERIFY(translator.load(dataDir + "idbased.qm")); @@ -193,7 +193,7 @@ void tst_lrelease::idbased() void tst_lrelease::markuntranslated() { - QVERIFY(!QProcess::execute(lrelease + " -markuntranslated # -idbased " + dataDir + "idbased.ts")); + QVERIFY(!QProcess::execute(lrelease, QStringList() << "-markuntranslated" << "#" << "-idbased" << (dataDir + "idbased.ts"))); QTranslator translator; QVERIFY(translator.load(dataDir + "idbased.qm")); @@ -206,7 +206,7 @@ void tst_lrelease::markuntranslated() void tst_lrelease::dupes() { QProcess proc; - proc.start(lrelease + " " + dataDir + "dupes.ts", QIODevice::ReadWrite | QIODevice::Text); + proc.start(lrelease, QStringList() << (dataDir + "dupes.ts"), QIODevice::ReadWrite | QIODevice::Text); QVERIFY(proc.waitForFinished()); QVERIFY(proc.exitStatus() == QProcess::NormalExit); doCompare(QString(proc.readAllStandardError()).trimmed().split('\n'), dataDir + "dupes.errors"); diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 6d1c3eddb..08ea6ff49 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -288,7 +288,7 @@ void tst_lupdate::good() QProcess proc; proc.setWorkingDirectory(workDir); proc.setProcessChannelMode(QProcess::MergedChannels); - const QString command = m_cmdLupdate + QLatin1Char(' ') + lupdatecmd; + const QString command = QLatin1Char('"') + m_cmdLupdate + QLatin1String("\" ") + lupdatecmd; proc.start(command, QIODevice::ReadWrite | QIODevice::Text); QVERIFY2(proc.waitForStarted(), qPrintable(command + QLatin1String(" :") + proc.errorString())); QVERIFY2(proc.waitForFinished(30000), qPrintable(command)); |