diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-16 08:44:07 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-16 08:45:10 (GMT) |
commit | f26fe1cb7bbbdfd3e623a67612dcb30716b257e8 (patch) | |
tree | b347b20c89c543a602df4feaa4eab04871641f9d /tests/auto/linguist | |
parent | e3b0faf03a2db5b0e38d97ceda09024ec8daf458 (diff) | |
parent | aa482dcbde0089fe32ca59e39f17e5e44fd8b244 (diff) | |
download | Qt-f26fe1cb7bbbdfd3e623a67612dcb30716b257e8.zip Qt-f26fe1cb7bbbdfd3e623a67612dcb30716b257e8.tar.gz Qt-f26fe1cb7bbbdfd3e623a67612dcb30716b257e8.tar.bz2 |
Merge branch 'upstream/4.6' into oslo-staging-2/4.6
Diffstat (limited to 'tests/auto/linguist')
-rw-r--r-- | tests/auto/linguist/lconvert/tst_lconvert.cpp | 8 | ||||
-rw-r--r-- | tests/auto/linguist/lrelease/tst_lrelease.cpp | 8 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testlupdate.cpp | 4 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/tst_lupdate.cpp | 12 |
4 files changed, 17 insertions, 15 deletions
diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp index e38e22c..10098a4 100644 --- a/tests/auto/linguist/lconvert/tst_lconvert.cpp +++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp @@ -105,7 +105,7 @@ void tst_lconvert::doCompare(QIODevice *actualDev, const QString &expectedFn) QList<QByteArray> actual = actualDev->readAll().split('\n'); QFile file(expectedFn); - QVERIFY(file.open(QIODevice::ReadOnly)); + QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); QList<QByteArray> expected = file.readAll().split('\n'); int i = 0, ei = expected.size(), gi = actual.size(); @@ -179,7 +179,7 @@ void tst_lconvert::convertChain(const QString &_inFileName, const QString &_outF if (!argList.isEmpty()) args += argList[i]; args << "-if" << stations[i] << "-i" << "-" << "-of" << stations[i + 1]; - cvts.at(i)->start(binDir + "/lconvert", args); + cvts.at(i)->start(binDir + "/lconvert", args, QIODevice::ReadWrite | QIODevice::Text); } int st = 0; foreach (QProcess *cvt, cvts) @@ -243,7 +243,9 @@ void tst_lconvert::converts() QString outFileNameFq = dataDir + outFileName; QProcess cvt; - cvt.start(binDir + "/lconvert", QStringList() << "-i" << (dataDir + inFileName) << "-of" << format); + cvt.start(binDir + "/lconvert", + QStringList() << "-i" << (dataDir + inFileName) << "-of" << format, + QIODevice::ReadWrite | QIODevice::Text); doWait(&cvt, 0); if (QTest::currentTestFailed()) return; diff --git a/tests/auto/linguist/lrelease/tst_lrelease.cpp b/tests/auto/linguist/lrelease/tst_lrelease.cpp index 93cb97c..c9e774f 100644 --- a/tests/auto/linguist/lrelease/tst_lrelease.cpp +++ b/tests/auto/linguist/lrelease/tst_lrelease.cpp @@ -72,8 +72,8 @@ private: void tst_lrelease::doCompare(const QStringList &actual, const QString &expectedFn) { QFile file(expectedFn); - QVERIFY(file.open(QIODevice::ReadOnly)); - QStringList expected = QString(file.readAll()).trimmed().remove('\r').split('\n'); + QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); + QStringList expected = QString(file.readAll()).trimmed().split('\n'); int i = 0, ei = expected.size(), gi = actual.size(); for (; ; i++) { @@ -226,10 +226,10 @@ void tst_lrelease::markuntranslated() void tst_lrelease::dupes() { QProcess proc; - proc.start(binDir + "/lrelease testdata/dupes.ts"); + proc.start(binDir + "/lrelease testdata/dupes.ts", QIODevice::ReadWrite | QIODevice::Text); QVERIFY(proc.waitForFinished()); QVERIFY(proc.exitStatus() == QProcess::NormalExit); - doCompare(QString(proc.readAllStandardError()).trimmed().remove('\r').split('\n'), "testdata/dupes.errors"); + doCompare(QString(proc.readAllStandardError()).trimmed().split('\n'), "testdata/dupes.errors"); } QTEST_MAIN(tst_lrelease) diff --git a/tests/auto/linguist/lupdate/testlupdate.cpp b/tests/auto/linguist/lupdate/testlupdate.cpp index 8e57323..d43fbc4 100644 --- a/tests/auto/linguist/lupdate/testlupdate.cpp +++ b/tests/auto/linguist/lupdate/testlupdate.cpp @@ -98,9 +98,9 @@ bool TestLUpdate::runChild( bool showOutput, const QString &program, const QStri connect(childProc, SIGNAL(finished(int)), this, SLOT(childReady(int))); childProc->setProcessChannelMode(QProcess::MergedChannels); if (argList.isEmpty()) { - childProc->start( program ); + childProc->start( program, QIODevice::ReadWrite | QIODevice::Text ); } else { - childProc->start( program, argList ); + childProc->start( program, argList, QIODevice::ReadWrite | QIODevice::Text ); } bool ok; diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 230392c..7140ede 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -80,8 +80,8 @@ private: void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn, bool err) { QFile file(expectedFn); - QVERIFY(file.open(QIODevice::ReadOnly)); - QStringList expected = QString(file.readAll()).trimmed().remove('\r').split('\n'); + QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); + QStringList expected = QString(file.readAll()).trimmed().split('\n'); int i = 0, ei = expected.size(), gi = actual.size(); for (; ; i++) { @@ -141,8 +141,8 @@ void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn void tst_lupdate::doCompare(const QString &actualFn, const QString &expectedFn, bool err) { QFile afile(actualFn); - QVERIFY(afile.open(QIODevice::ReadOnly)); - QStringList actual = QString(afile.readAll()).trimmed().remove('\r').split('\n'); + QVERIFY(afile.open(QIODevice::ReadOnly | QIODevice::Text)); + QStringList actual = QString(afile.readAll()).trimmed().split('\n'); doCompare(actual, expectedFn, err); } @@ -180,7 +180,7 @@ void tst_lupdate::good() QString lupdatecmd; QFile file(dir + "/lupdatecmd"); if (file.exists()) { - QVERIFY(file.open(QIODevice::ReadOnly)); + QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); while (!file.atEnd()) { QByteArray cmdstring = file.readLine().simplified(); if (cmdstring.startsWith('#')) @@ -226,7 +226,7 @@ void tst_lupdate::output_ts() QString lupdatecmd; QFile file(dir + "/lupdatecmd"); if (file.exists()) { - QVERIFY(file.open(QIODevice::ReadOnly)); + QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); while (!file.atEnd()) { QByteArray cmdstring = file.readLine().simplified(); if (cmdstring.startsWith('#')) |