From 14d8e280407989181cc9581803ed1a080414e77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kimmo=20Kotaj=C3=A4rvi?= Date: Fri, 5 Mar 2010 17:10:43 +0100 Subject: Added test for QTBUG-6962: Empty authority ignored by QUrl::setAuthority. Merge-request: 482 Reviewed-by: Thiago Macieira --- tests/auto/qurl/tst_qurl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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" -- cgit v0.12