diff -r ef0373b55136 -r 758a864f9613 tests/auto/qurl/tst_qurl.cpp --- a/tests/auto/qurl/tst_qurl.cpp Fri Sep 17 08:34:18 2010 +0300 +++ b/tests/auto/qurl/tst_qurl.cpp Mon Oct 04 01:19:32 2010 +0300 @@ -194,6 +194,7 @@ void task_199967(); void task_240612(); void taskQTBUG_6962(); + void taskQTBUG_8701(); #ifdef QT3_SUPPORT void dirPath(); @@ -3912,5 +3913,17 @@ QCOMPARE(url.authority(), QString()); } +void tst_QUrl::taskQTBUG_8701() +{ + //bug 8701: foo:///bar mangled to foo:/bar + QString foo_triple_bar("foo:///bar"), foo_uni_bar("foo:/bar"); + + QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar).toString()); + QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar).toString()); + + QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar, QUrl::StrictMode).toString()); // fails + QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar, QUrl::StrictMode).toString()); +} + QTEST_MAIN(tst_QUrl) #include "tst_qurl.moc"