summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-09-07 15:52:44 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-09-08 11:29:22 (GMT)
commita91a9d014adaeaa58640641579e30b5ff2383e99 (patch)
tree68b2c24a9be400b4b5a94367c1e865bc75699790 /tests
parentcb23007c0e04e8d23b426ca1a3672f70282012c7 (diff)
downloadQt-a91a9d014adaeaa58640641579e30b5ff2383e99.zip
Qt-a91a9d014adaeaa58640641579e30b5ff2383e99.tar.gz
Qt-a91a9d014adaeaa58640641579e30b5ff2383e99.tar.bz2
Fix handling of braces/no-braces in QUrl::host / setHost.
The hostname is supposed to be stored in canonical form, with the braces. However, if you call url.setHost("::1"), then a non-canonical hostname is stored. So make the canonicalisation function correct this. Task-number: QTBUG-13464 Reviewed-by: Markus Goetz
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qurl/tst_qurl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index 370bd13..b5236e5 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -2266,7 +2266,9 @@ void tst_QUrl::ipv6()
QCOMPARE(url.isValid(), isValid);
if (url.isValid()) {
- QCOMPARE(url.toString(), ipv6Auth);
+ QCOMPARE(url.toString(), ipv6Auth);
+ url.setHost(url.host());
+ QCOMPARE(url.toString(), ipv6Auth);
}
};
@@ -2290,6 +2292,8 @@ void tst_QUrl::ipv6_2()
QUrl url(input);
QCOMPARE(url.toString(), output);
+ url.setHost(url.host());
+ QCOMPARE(url.toString(), output);
}
void tst_QUrl::moreIpv6()