diff options
author | David Faure <faure@kde.org> | 2009-10-12 21:22:54 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-13 08:20:52 (GMT) |
commit | fc5e8bb849232cce27d5f53491cd01628abad760 (patch) | |
tree | 6ead54ff7dfb38ff3b1123a1a35db89f8f1c15b9 /tests/auto/qurl | |
parent | 2d2e422107a93a2a84ba74399678496619329e58 (diff) | |
download | Qt-fc5e8bb849232cce27d5f53491cd01628abad760.zip Qt-fc5e8bb849232cce27d5f53491cd01628abad760.tar.gz Qt-fc5e8bb849232cce27d5f53491cd01628abad760.tar.bz2 |
Fix QUrl regression with setHost("::ffff:129.144.52.38")
toEncoded was returning an empty host instead of [::ffff:129.144.52.38]
Merge-request: 1735
Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
Diffstat (limited to 'tests/auto/qurl')
-rw-r--r-- | tests/auto/qurl/tst_qurl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 026c30e..72c13bf 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -137,6 +137,7 @@ private slots: void ipv6(); void ipv6_2_data(); void ipv6_2(); + void moreIpv6(); void toPercentEncoding_data(); void toPercentEncoding(); void isRelative_data(); @@ -2276,6 +2277,13 @@ void tst_QUrl::ipv6_2() QCOMPARE(url.toString(), output); } +void tst_QUrl::moreIpv6() +{ + QUrl waba1("http://www.kde.org/cgi/test.cgi"); + waba1.setHost("::ffff:129.144.52.38"); + QCOMPARE(QString::fromLatin1(waba1.toEncoded()), QString::fromLatin1("http://[::ffff:129.144.52.38]/cgi/test.cgi")); +} + void tst_QUrl::punycode_data() { QTest::addColumn<QString>("original"); |