diff options
author | Marc Mutz <marc.mutz@qt.io> | 2021-12-28 14:12:28 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2021-12-28 23:09:44 +0100 |
commit | a5076c54fe6c466ecf21d6d968016726e3928a78 (patch) | |
tree | 03ee5f6fdfe348c976830cee7cf4e8e04354482c /tests/auto/corelib/text/qstringlist | |
parent | 1181af9452b8cf41e410e78fd570d15c44bc8fa0 (diff) |
tst_QStringList: check that join(u'\0') embeds NULs
... as opposed to QByteArray::toHex('\0'), which doesn't.
Picking to all LTSs because it's in a test.
Pick-to: 6.3 6.2 5.15
Change-Id: I392d5714c4865e530a246ed30a13cdac26b98e0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/text/qstringlist')
-rw-r--r-- | tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp index a6fe866797..844a228e62 100644 --- a/tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp +++ b/tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp @@ -427,6 +427,11 @@ void tst_QStringList::joinChar_data() const << QLatin1String("c")) << QChar(QLatin1Char(' ')) << QString("a b c"); + + QTest::newRow("null separator") + << QStringList{QStringLiteral("a"), QStringLiteral("b"), QStringLiteral("c")} + << QChar(u'\0') + << QStringLiteral("a\0b\0c"); } void tst_QStringList::joinEmptiness() const |