summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-08-17 16:10:30 +0200
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-08-25 00:13:39 +0200
commit5b013997811063f22853d63809a6581f2a2628ed (patch)
tree3ab5d9f3ffc842d94d98385643fa26ebe280bc2a /tests/auto/corelib/io
parentbac329a28b14ccddcdb45a4ef51cd8056eda9233 (diff)
tst_qurl: Make an invalid URL test compatible with UTS #46
Use U+1F100 DIGIT ZERO FULL STOP instead of U+1F4D9 ORANGE BOOK. The latter is not allowed according to IDNA 2003 rules but is allowed according to UTS #46 rules. The former is disallowed in either case. Task-number: QTBUG-85371 Change-Id: Idc8afef68c26ae0b702a475e5a53592182998a08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index dae137cf10..7872ac1d88 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -2145,14 +2145,15 @@ void tst_QUrl::isValid()
}
{
- QUrl url = QUrl::fromEncoded("foo://%f0%9f%93%99.example.la/g");
+ // U+1F100 DIGIT ZERO FULL STOP
+ QUrl url = QUrl::fromEncoded("foo://%f0%9f%84%80.example.la/g");
QVERIFY(!url.isValid());
QVERIFY(url.toString().isEmpty());
QCOMPARE(url.path(), QString("/g"));
- url.setHost("%f0%9f%93%99.example.la/");
+ url.setHost("%f0%9f%84%80.example.la/");
QVERIFY(!url.isValid());
QVERIFY(url.toString().isEmpty());
- url.setHost("\xf0\x9f\x93\x99.example.la/");
+ url.setHost("\xf0\x9f\x84\x80.example.la/");
QVERIFY(!url.isValid());
QVERIFY(url.toString().isEmpty());
QVERIFY2(url.errorString().contains("Invalid hostname"),