summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-27 12:20:44 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-27 17:10:17 +0000
commit6e3375a9eb63383615536a3faae15102f93b451e (patch)
tree2cc9c8d17f651fd43719f1e9e16052d828f3c594
parent6a5c7396a59f8e8e01335d389a15144d02a4c756 (diff)
downloadqttools-6e3375a9eb63383615536a3faae15102f93b451e.tar.gz
Prospective fix to make lupdate tests pass.
Suppress the qmake message about creating a .stash file. This should fix failures like: FAIL! : tst_lupdate::good(heuristics) Output for /Users/qt/work/qt/qttools/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt does not meet expectations: <<<<<<< got Info: creating stash file /Users/qt/work/qt/qttools/tests/auto/linguist/lupdate/testdata/good/heuristics/.qmake.stash ========= >>>>>>> expected Change-Id: I1f7737e7f8463fcd92a4faf7f87a484de72d0921 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp
index 4138c6410..04355761a 100644
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
@@ -60,7 +60,7 @@ private:
QString m_cmdLupdate;
QString m_basePath;
- void doCompare(const QStringList &actual, const QString &expectedFn, bool err);
+ void doCompare(QStringList actual, const QString &expectedFn, bool err);
void doCompare(const QString &actualFn, const QString &expectedFn, bool err);
};
@@ -114,12 +114,17 @@ static bool prepareMatch(const QString &expect, QString *tmpl, int *require, int
return true;
}
-void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn, bool err)
+void tst_lupdate::doCompare(QStringList actual, const QString &expectedFn, bool err)
{
QFile file(expectedFn);
QVERIFY2(file.open(QIODevice::ReadOnly | QIODevice::Text), qPrintable(expectedFn));
QStringList expected = QString(file.readAll()).split('\n');
+ for (int i = actual.size() - 1; i >= 0; --i) {
+ if (actual.at(i).startsWith(QLatin1String("Info: creating stash file ")))
+ actual.removeAt(i);
+ }
+
int ei = 0, ai = 0, em = expected.size(), am = actual.size();
int oei = 0, oai = 0, oem = em, oam = am;
int require = 0, accept = 0;