From 83e3c4677a71d8f890f9506360b95b7f9ac9bd84 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 11 Jan 2010 13:48:27 +0100 Subject: print actual rather than expected output for matching text the expected may contain regular expressions. --- tests/auto/linguist/lupdate/tst_lupdate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 80c8f4f..ff3ab68 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -120,7 +120,7 @@ void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn } QByteArray diff; for (int j = qMax(0, i - 3); j < i; j++) - diff += expected.at(j) + '\n'; + diff += actual.at(j) + '\n'; diff += "<<<<<<< got\n"; for (int j = i; j < gi; j++) { diff += actual.at(j) + '\n'; @@ -138,8 +138,8 @@ void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn } } diff += ">>>>>>> expected\n"; - for (int j = ei; j < qMin(ei + 3, expected.size()); j++) - diff += expected.at(j) + '\n'; + for (int j = gi; j < qMin(gi + 3, actual.size()); j++) + diff += actual.at(j) + '\n'; QFAIL(qPrintable((err ? "Output for " : "Result for ") + expectedFn + " does not meet expectations:\n" + diff)); } -- cgit v0.12