tst_qurlinternal: Add a test for Punycode handling of non-BMP codepoints
Use U+102F7 as an example. The current code is not able to handle conversion of Unicode codepoints outside BMP correctly, so mark the test as expected failure. Task-number: QTBUG-95577 Pick-to: 6.2 Change-Id: Ifd50cf306bce4940f84cb412de148eac952e6c09 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
7d86cf02c1
commit
1f20606fa3
@ -231,6 +231,9 @@ void tst_QUrlInternal::idna_testsuite_data()
|
||||
QTest::newRow("Russian (Cyrillic)") << 28 << char16array(d20)
|
||||
<< QByteArray(IDNA_ACE_PREFIX "b1abfaaepdrnnbgefbadotcwatmq2g4l")
|
||||
<< 0 << 0 << IDNA_SUCCESS << IDNA_SUCCESS;
|
||||
|
||||
char16_t d21[] = { 0xd800, 0xdef7 };
|
||||
QTest::newRow("U+102F7") << 2 << char16array(d21) << QByteArray(IDNA_ACE_PREFIX "r97c");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -243,6 +246,7 @@ void tst_QUrlInternal::idna_testsuite()
|
||||
|
||||
QString result;
|
||||
qt_punycodeEncoder(QStringView{unicode.points, numchars}, &result);
|
||||
QEXPECT_FAIL("U+102F7", "QTBUG-95577: Non-BMP handling is broken", Continue);
|
||||
QCOMPARE(result.toLatin1(), punycode);
|
||||
QCOMPARE(qt_punycodeDecoder(result), QString::fromUtf16(unicode.points, numchars));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user