diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2020-09-21 14:31:56 +0200 |
---|---|---|
committer | Andreas Buhr <andreas.buhr@qt.io> | 2020-09-23 16:59:07 +0200 |
commit | b50e81b5b189c98244bdc0d5081a90cd875982d0 (patch) | |
tree | a7b0281cd76ecf0b507260e2b2438e41b328ed5c /tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp | |
parent | ac0be4d568f2961556a6a07fffc3425ea4adb7db (diff) |
Add unit test to check emoji handling in date-time parsing
Add some unit tests using emojis as separator characters to check
utf handling.
Change-Id: I03c4bb5cd349e649c58e8a908c38a0185d80e722
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp')
-rw-r--r-- | tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp index c6ec869460..b942316c95 100644 --- a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp @@ -2673,6 +2673,11 @@ void tst_QDateTime::fromStringStringFormat_data() << QStringLiteral("2018 wilful long working block relief 12-19T21:09 cruel") << QStringLiteral("yyyy wilful long working block relief MM-ddThh:mm cruel blurb encore flux") << QDateTime(); + + // test unicode + QTest::newRow("unicode handling") << QString(u8"2005🤣06🤣28T07🤣57🤣30.001Z") + << QString(u8"yyyy🤣MM🤣ddThh🤣mm🤣ss.zt") + << QDateTime(QDate(2005, 06, 28), QTime(07, 57, 30, 1), Qt::UTC); } void tst_QDateTime::fromStringStringFormat() |