diff options
author | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-08-18 13:09:56 +0200 |
---|---|---|
committer | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-08-25 00:13:39 +0200 |
commit | 8b5de677a7403ce212022fe2a6ff267d002ecb26 (patch) | |
tree | 043c7146e726aa776d9bc9eb3afab9f1b3703c5d /tests | |
parent | d9881799c112297abfc2a27298690655bea7f99c (diff) |
tst_qurl{,internal}: Use U+FB01 for normalization to ASCII test cases
Use U+FB01 LATIN SMALL LIGATURE FI instead of U+00DF LATIN SMALL
LETTER SHARP S in testcases that need non-ASCII URLs that are
normalized to ASCII. The latter is not normalized to ASCII when
using UTS #46 nontransitional processing.
Task-number: QTBUG-85371
Change-Id: I8c153feb58e556b1d31439018cc84d8e8f1de1a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 5 | ||||
-rw-r--r-- | tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 7872ac1d88..c4bbe634c9 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -2081,8 +2081,9 @@ void tst_QUrl::hasQuery() void tst_QUrl::nameprep() { - QUrl url(QString::fromUtf8("http://www.fu""\xc3""\x9f""ball.de/")); - QCOMPARE(url.toString(), QString::fromLatin1("http://www.fussball.de/")); + // U+FB01 LATIN SMALL LIGATURE FI + QUrl url(u"http://www.\uFB01le.de/"_qs); + QCOMPARE(url.toString(), QStringLiteral(u"http://www.file.de/")); } void tst_QUrl::isValid() diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp index 5380fe17f4..6c556f1f25 100644 --- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp +++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp @@ -258,8 +258,9 @@ void tst_QUrlInternal::ace_testsuite_data() QTest::newRow("ascii-mixed") << "FLuke" << "fluke" << "fluke" << "fluke"; QTest::newRow("ascii-upper") << "FLUKE" << "fluke" << "fluke" << "fluke"; - QTest::newRow("asciifolded") << QString::fromLatin1("stra\337e") << "strasse" << "." << "strasse"; - QTest::newRow("asciifolded-dotcom") << QString::fromLatin1("stra\337e.example.com") << "strasse.example.com" << "." << "strasse.example.com"; + // U+FB01 LATIN SMALL LIGATURE FI + QTest::newRow("asciifolded") << u"\uFB01le"_qs << "file" << "." << "file"; + QTest::newRow("asciifolded-dotcom") << u"\uFB01le.example.com"_qs << "file.example.com" << "." << "file.example.com"; QTest::newRow("greek-mu") << QString::fromLatin1("\265V") <<"xn--v-lmb" << "." |