aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllocale
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-02-09 09:46:40 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-02-09 13:02:01 +0100
commit58935a5cdc0037750bca089cea211769e36591e6 (patch)
tree9a2c1bc98819a9ad9f7b8ecdb05d94903adc9e6e /tests/auto/qml/qqmllocale
parent69708da26e72eb34c52277760f15abf0cf0974af (diff)
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>
Diffstat (limited to 'tests/auto/qml/qqmllocale')
-rw-r--r--tests/auto/qml/qqmllocale/tst_qqmllocale.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
index 3349f5f9b6..1f005ae5ca 100644
--- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
+++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
@@ -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());