summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstring/tst_qstring.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-26 01:00:25 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-02-26 18:39:21 +0100
commit75c0ffaf6d2b92cdf26092e01acdd5af4afeac97 (patch)
treebb9e85c21248790ec99b3665928872e39b14db64 /tests/auto/corelib/text/qstring/tst_qstring.cpp
parent4753d69d8934258de7fb64550e50a5cbb9b5603f (diff)
parent462c2745a5168a5b57381d05779b5d16aebe018e (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
Diffstat (limited to 'tests/auto/corelib/text/qstring/tst_qstring.cpp')
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp
index ca58b664a0..2c02fb2264 100644
--- a/tests/auto/corelib/text/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp
@@ -4684,6 +4684,12 @@ void tst_QString::fromUcs4()
s = QString::fromUcs4(U"\u221212\U000020AC\U00010000");
QCOMPARE(s, QString::fromUtf8("\342\210\222" "12" "\342\202\254" "\360\220\200\200"));
#endif
+
+ // QTBUG-62011: don't mistake ZWNBS for BOM
+ // Start with one BOM, to ensure we use the right endianness:
+ const uint text[] = { 0xfeff, 97, 0xfeff, 98, 0xfeff, 99, 0xfeff, 100 };
+ s = QString::fromUcs4(text, 8);
+ QCOMPARE(s, QStringView(u"a\xfeff" u"b\xfeff" u"c\xfeff" "d"));
}
void tst_QString::toUcs4()