diff options
author | Peter Hartmann <phartmann@rim.com> | 2012-12-14 16:50:30 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-15 04:43:41 (GMT) |
commit | 01a05c104036b11b09ab827847cacb766ee533ad (patch) | |
tree | ec93031be61c68563b30dc15df1593288ed0ed44 /tests | |
parent | 3f13d38b0f0fee28f57c8b5193cbe12511abb042 (diff) | |
download | Qt-01a05c104036b11b09ab827847cacb766ee533ad.zip Qt-01a05c104036b11b09ab827847cacb766ee533ad.tar.gz Qt-01a05c104036b11b09ab827847cacb766ee533ad.tar.bz2 |
QUrl: ensure toEncoded() matches toString() wrt. empty authority
This was already fixed for toString() with commit 884f15e, this commit
also fixes the toEncoded() implementation.
In Qt5 this is already working.
Task-number: QTBUG-8701
Change-Id: I0c81801e74d97de31632df45e52a25eb037b4710
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qurl/tst_qurl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 726d05e..81f646d 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -4018,10 +4018,16 @@ void tst_QUrl::taskQTBUG_8701() QString foo_triple_bar("foo:///bar"), foo_uni_bar("foo:/bar"); QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar).toString()); + QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar).toEncoded())); + QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar).toString()); + QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar).toEncoded())); QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar, QUrl::StrictMode).toString()); // fails + QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar, QUrl::StrictMode).toEncoded())); // fails + QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar, QUrl::StrictMode).toString()); + QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar, QUrl::StrictMode).toEncoded())); } void tst_QUrl::effectiveTLDs_data() |