tst_qqmllocale: Adapt to changed time format data

In Australia, they have a non-breaking space between the time and the
AM/PM now. We're not interested in non-breaking spaces here.

Pick-to: 6.5
Fixes: QTBUG-111048
Change-Id: Id99d3deba068069ba6a0d4f5b045571c377d8b6f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Ulf Hermann 2023-02-09 09:46:40 +01:00
parent 69708da26e
commit 58935a5cdc
1 changed files with 9 additions and 1 deletions

View File

@ -763,7 +763,15 @@ void tst_qqmllocale::testFunctionCall()
STOP_ON_FAILURE
QVERIFY(evaluationResult.canConvert<QString>());
STOP_ON_FAILURE
QCOMPARE(evaluationResult.toString(), expectedResult);
// We're not interested in whether the spaces in the date/time format
// are breaking or non-breaking.
const QString resultWithBreakingSpaces
= evaluationResult.toString().replace(u'\u202f', u' ');
const QString expectedWithBreakingSpaces
= expectedResult.replace(u'\u202f', u' ');
QCOMPARE(resultWithBreakingSpaces, expectedWithBreakingSpaces);
STOP_ON_FAILURE
} else {
QVERIFY(qmlExpression.hasError());