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>
bb10
Marc Mutz 2021-12-28 14:12:28 +01:00
parent 1181af9452
commit a5076c54fe
1 changed files with 5 additions and 0 deletions

View File

@ -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