summaryrefslogtreecommitdiffstats
path: root/tests/auto/qurl/tst_qurl.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-07 03:36:30 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-07 03:36:30 (GMT)
commit1d8d397121329a178f96d476b1e585cf7d938f2d (patch)
treec9eda8fc5645f824561d3640b205e9d979e0cfdc /tests/auto/qurl/tst_qurl.cpp
parentd6cb7c903069e1dfde3ffc69649354c97d160b68 (diff)
parent3a9c669816c2b0784b5c9e1790bc3bbd036cf013 (diff)
downloadQt-1d8d397121329a178f96d476b1e585cf7d938f2d.zip
Qt-1d8d397121329a178f96d476b1e585cf7d938f2d.tar.gz
Qt-1d8d397121329a178f96d476b1e585cf7d938f2d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (132 commits) Make QCompleter cope with restricted screen real estate (mobile devices) Don't initialize Wintab if QT_NO_TABLETEVENT is defined. QDBusXmlGenerator: get the true name from QMetaType for the return type Add missing newline to static XML snippet Fix compilation in C++0x mode (narrowing of constants) My changelog entries for core and network Doc: updating html and search feature my changelog Doc - mention vcsubdirs as a possible value for TEMPLATE doc: Second attempt to begin reorganizing the top doc page. Fix syntax error in configure script fix qmake project file following msvc2010 addition remove extraneous return statement cosmetics: change enum value isOnActiveSpace is available from 10.6. QTcpServer: Fix documentation for previous commit Keep support for maximum pending connections in derived QTcpServer [QNAM FTP] Check for the "ftp" scheme case-insensitively Use QUrl::isLocalFile and fix the scheme checking in local URLs. Improve QUrl handling of local file paths ...
Diffstat (limited to 'tests/auto/qurl/tst_qurl.cpp')
-rw-r--r--tests/auto/qurl/tst_qurl.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index fa42adc..67bf0c1 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -314,6 +314,7 @@ void tst_QUrl::constructing()
QUrl buildUNC;
+ buildUNC.setScheme(QString::fromLatin1("file"));
buildUNC.setHost(QString::fromLatin1("somehost"));
buildUNC.setPath(QString::fromLatin1("somepath"));
QCOMPARE(buildUNC.toLocalFile(), QString::fromLatin1("//somehost/somepath"));
@@ -1757,7 +1758,15 @@ void tst_QUrl::toLocalFile_data()
QTest::newRow("data7") << QString::fromLatin1("file://somehost/") << QString::fromLatin1("//somehost/");
QTest::newRow("data8") << QString::fromLatin1("file://somehost") << QString::fromLatin1("//somehost");
QTest::newRow("data9") << QString::fromLatin1("file:////somehost/somedir/somefile") << QString::fromLatin1("//somehost/somedir/somefile");
-
+ QTest::newRow("data10") << QString::fromLatin1("FILE:/a.txt") << QString::fromLatin1("/a.txt");
+
+ // and some that result in empty (i.e., not local)
+ QTest::newRow("xdata0") << QString::fromLatin1("/a.txt") << QString();
+ QTest::newRow("xdata1") << QString::fromLatin1("//a.txt") << QString();
+ QTest::newRow("xdata2") << QString::fromLatin1("///a.txt") << QString();
+ QTest::newRow("xdata3") << QString::fromLatin1("foo:/a.txt") << QString();
+ QTest::newRow("xdata4") << QString::fromLatin1("foo://a.txt") << QString();
+ QTest::newRow("xdata5") << QString::fromLatin1("foo:///a.txt") << QString();
}
void tst_QUrl::toLocalFile()