From acaad4c6cc36439b3b836992949d287b53574f06 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Sep 2010 11:00:49 +0200 Subject: make lupdate test less fragile the sensivity to additions of new calls to unimplemented qmake functions to .prf files kinda sucks, so remove it. --- .../linguist/lupdate/testdata/good/heuristics/expectedoutput.txt | 1 - tests/auto/linguist/lupdate/tst_lupdate.cpp | 9 ++++++++- 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; -- cgit v0.12