tst_QStringApiSymmetry: add more invalid UTF-8 sequences

These represent US-ASCII characters incorrectly encoded as a two-octet
UTF-8 sequence.

Pick-to: 6.6 6.5
Change-Id: I5b1d58066d08cf61583dabcd71dd2f3ac7a3585a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2023-10-05 22:15:06 +02:00
parent 4e8b54eb81
commit bc3ae300c5

View File

@ -3619,6 +3619,8 @@ void tst_QStringApiSymmetry::isValidUtf8_data()
row = 0;
QTest::addRow("overlong-%02d", row++) << QByteArray("\xc0\x00") << false;
QTest::addRow("overlong-%02d", row++) << QByteArray("\xc1\xff") << false;
QTest::addRow("overlong-%02d", row++) << QByteArray("\xc1\xbf") << false;
QTest::addRow("overlong-%02d", row++) << QByteArray("\xc1\x01") << false;
QTest::addRow("overlong-%02d", row++) << QByteArray("\xe0\x00\x00") << false;
QTest::addRow("overlong-%02d", row++) << QByteArray("\xe0\xa0\x7f") << false;
QTest::addRow("overlong-%02d", row++) << QByteArray("\xf0\x00\x00\x00") << false;