summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-09-21 09:00:49 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-09-21 09:00:49 (GMT)
commitacaad4c6cc36439b3b836992949d287b53574f06 (patch)
tree76953897d8ab81c45201b46cb1a3358981723866 /tests
parent20b79761dcd9330eb068e8cfcb7d7fc89ed24dfb (diff)
downloadQt-acaad4c6cc36439b3b836992949d287b53574f06.zip
Qt-acaad4c6cc36439b3b836992949d287b53574f06.tar.gz
Qt-acaad4c6cc36439b3b836992949d287b53574f06.tar.bz2
make lupdate test less fragile
the sensivity to additions of new calls to unimplemented qmake functions to .prf files kinda sucks, so remove it.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt1
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp9
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt
index 093610d..1eed403 100644
--- a/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt
+++ b/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt
@@ -1,4 +1,3 @@
-*.*Function 'eval' is not implemented
Updating 'project\.ts'\.\.\.
Found 3 source text\(s\) \(3 new and 0 already existing\)
Removed 5 obsolete entries
diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp
index 5ba6c52..e6d2135 100644
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
@@ -122,12 +122,19 @@ 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(const 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');
+ QStringList actual;
+ actual.reserve(_actual.size());
+ QRegExp niRx(".*:Function '\\w+' is not implemented");
+ foreach (const QString &a, _actual)
+ if (!niRx.exactMatch(a))
+ actual << a;
+
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;