diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-08-06 15:00:07 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-07 12:45:13 +0200 |
commit | e6218ecfb55d67397331213663043e9fb71fcdb8 (patch) | |
tree | 00fe73db81be97a0a93b3b0166c3de9dca0369e2 /tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | |
parent | 5885b8f775998c30d53f40b7f368c5f6364e6df4 (diff) |
Improve tst_QFileInfo::compare() test, but mark as QEXPECT_FAIL on Mac
As Qt still thinks that all UNIX filesystems are case sensitive, which
is not the case for eg Mac, where they might be both, as well as for
mounts of other filesystems.
Change-Id: I07b8550685bfa17ac407c20ac991dc54df040942
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp')
-rw-r--r-- | tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index bcc971bf4b..af2578ac37 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -916,16 +916,6 @@ void tst_QFileInfo::compare_data() QTest::addColumn<QString>("file2"); QTest::addColumn<bool>("same"); -#if defined(Q_OS_MAC) - // Since 10.6 we use realpath() in qfsfileengine, and it properly handles - // file system case sensitivity. However here in the autotest we don't - // check if the file system is case sensitive, so to make it pass in the - // default OS X installation we assume we are running on a case insensitive - // file system if on 10.6 and on a case sensitive file system if on 10.5 - bool caseSensitiveOnMac = true; - if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) - caseSensitiveOnMac = false; -#endif QString caseChangedSource = m_sourceFile; caseChangedSource.replace("info", "Info"); @@ -947,7 +937,7 @@ void tst_QFileInfo::compare_data() #if defined(Q_OS_WIN) << true; #elif defined(Q_OS_MAC) - << !caseSensitiveOnMac; + << !pathconf(QDir::currentPath().toLatin1().constData(), _PC_CASE_SENSITIVE); #else << false; #endif @@ -955,6 +945,11 @@ void tst_QFileInfo::compare_data() void tst_QFileInfo::compare() { +#if defined(Q_OS_MAC) + if (qstrcmp(QTest::currentDataTag(), "casesense1") == 0) + QSKIP("Qt thinks all UNIX filesystems are case sensitive, see QTBUG-28246"); +#endif + QFETCH(QString, file1); QFETCH(QString, file2); QFETCH(bool, same); |