summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKimmo Kotajärvi <kimmo.kotajarvi@nomovok.com>2010-03-05 16:10:43 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-05 16:10:43 (GMT)
commit14d8e280407989181cc9581803ed1a080414e77b (patch)
treed537aeb524421af49a209395f681fa36465ee073
parent4d263d64e561a07518985be1a111207a9243bf8d (diff)
downloadQt-14d8e280407989181cc9581803ed1a080414e77b.zip
Qt-14d8e280407989181cc9581803ed1a080414e77b.tar.gz
Qt-14d8e280407989181cc9581803ed1a080414e77b.tar.bz2
Added test for QTBUG-6962: Empty authority ignored by QUrl::setAuthority.
Merge-request: 482 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
-rw-r--r--tests/auto/qurl/tst_qurl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index 83109b5..b7cbdb8 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -193,6 +193,7 @@ private slots:
void fromUserInput();
void task_199967();
void task_240612();
+ void taskQTBUG_6962();
#ifdef QT3_SUPPORT
void dirPath();
@@ -3860,5 +3861,13 @@ void tst_QUrl::resolvedWithAbsoluteSchemes_data() const
<< QUrl::fromEncoded("http://www.foo.com:8080/newfile.html");
}
+void tst_QUrl::taskQTBUG_6962()
+{
+ //bug 6962: empty authority ignored by setAuthority
+ QUrl url("http://example.com/something");
+ url.setAuthority(QString());
+ QCOMPARE(url.authority(), QString());
+}
+
QTEST_MAIN(tst_QUrl)
#include "tst_qurl.moc"