diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 2fc0ea5c2a..e2fa0d3b47 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -3373,6 +3373,12 @@ void tst_QUrl::setComponents_data() QTest::newRow("path-%3A-before-slash") << QUrl() << int(Path) << "c%3A/" << Tolerant << true << PrettyDecoded << "c%3A/" << "c%3A/"; + QTest::newRow("path-doubleslash") << QUrl("trash:/") + << int(Path) << "//path" << Tolerant << true + << PrettyDecoded << "/path" << "trash:/path"; + QTest::newRow("path-withdotdot") << QUrl("file:///tmp") + << int(Path) << "//tmp/..///root/." << Tolerant << true + << PrettyDecoded << "/root" << "file:///root"; // the other fields can be present and be empty // that is, their delimiters would be present, but there would be nothing to one side @@ -3642,6 +3648,8 @@ void tst_QUrl::setComponents() if (isValid) { QFETCH(QString, toString); QCOMPARE(copy.toString(), toString); + // Check round-tripping + QCOMPARE(QUrl(copy.toString()).toString(), toString); } else { QVERIFY(copy.toString().isEmpty()); } |