summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qurl
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-30 01:00:19 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-30 01:00:19 +0200
commit07e92611050f78dae93bcd362112efd8efa7b41e (patch)
tree6951f77a6344436150c4f83f407e09d946f2c6c3 /tests/auto/corelib/io/qurl
parent69e68218e5082166d5c4ab1903fbacde00418a1c (diff)
parentcaa598c843eb27fd0c645e62723fd2d4e3e12f60 (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12
Diffstat (limited to 'tests/auto/corelib/io/qurl')
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index 1aa8984b70..84af1c255a 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -4143,6 +4143,18 @@ void tst_QUrl::matches_data()
<< "http://user:pass@www.website.com/directory"
<< "http://otheruser:otherpass@www.website.com/directory"
<< uint(QUrl::RemovePath | QUrl::RemoveAuthority) << true;
+ QTest::newRow("matchingHost-removePort") << "http://example.com" << "http://example.com"
+ << uint(QUrl::RemovePort) << true;
+ QTest::newRow("nonMatchingHost-removePort") << "http://example.com" << "http://example.net"
+ << uint(QUrl::RemovePort) << false;
+ QTest::newRow("matchingHost-removePassword") << "http://example.com" << "http://example.com"
+ << uint(QUrl::RemovePassword) << true;
+ QTest::newRow("nonMatchingHost-removePassword") << "http://example.com" << "http://example.net"
+ << uint(QUrl::RemovePassword) << false;
+ QTest::newRow("matchingUserName-removePassword") << "http://user@example.com" << "http://user@example.com"
+ << uint(QUrl::RemovePassword) << true;
+ QTest::newRow("nonMatchingUserName-removePassword") << "http://user@example.com" << "http://user2@example.com"
+ << uint(QUrl::RemovePassword) << false;
}
void tst_QUrl::matches()