From fd7e1cef9cc06a2e36d98942c6e929ee5589952e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 23 Apr 2012 17:02:17 +0200 Subject: Don't strip the leading slash of letter+colon paths on Unix It's perfectly valid to have a path of /c:/a.txt on Unix, so don't strip the leading slash unless we're on Windows. Task-number: QTBUG-20322 Change-Id: I721bd0a65b41048bc735d4eaa0d536174164fe64 Reviewed-by: Shane Kearns --- tests/auto/corelib/io/qurl/tst_qurl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index f9fbb8cba8..7e6dd14e82 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -1017,7 +1017,11 @@ void tst_QUrl::toLocalFile_data() QTest::newRow("data0") << QString::fromLatin1("file:/a.txt") << QString::fromLatin1("/a.txt"); QTest::newRow("data4") << QString::fromLatin1("file:///a.txt") << QString::fromLatin1("/a.txt"); +#ifdef Q_OS_WIN QTest::newRow("data5") << QString::fromLatin1("file:///c:/a.txt") << QString::fromLatin1("c:/a.txt"); +#else + QTest::newRow("data5") << QString::fromLatin1("file:///c:/a.txt") << QString::fromLatin1("/c:/a.txt"); +#endif QTest::newRow("data6") << QString::fromLatin1("file://somehost/somedir/somefile") << QString::fromLatin1("//somehost/somedir/somefile"); QTest::newRow("data7") << QString::fromLatin1("file://somehost/") << QString::fromLatin1("//somehost/"); QTest::newRow("data8") << QString::fromLatin1("file://somehost") << QString::fromLatin1("//somehost"); -- cgit v1.2.3