summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfileinfo/tst_qfileinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qfileinfo/tst_qfileinfo.cpp')
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index fdc629a..42e7250 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -828,6 +828,17 @@ 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
+
QTest::newRow("data0")
<< QString::fromLatin1(SRCDIR "tst_qfileinfo.cpp")
<< QString::fromLatin1(SRCDIR "tst_qfileinfo.cpp")
@@ -845,6 +856,8 @@ void tst_QFileInfo::compare_data()
<< QString::fromLatin1(SRCDIR "tst_qfileinfo.cpp")
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
<< true;
+#elif defined(Q_OS_MAC)
+ << !caseSensitiveOnMac;
#else
<< false;
#endif
@@ -856,7 +869,7 @@ void tst_QFileInfo::compare()
QFETCH(QString, file2);
QFETCH(bool, same);
QFileInfo fi1(file1), fi2(file2);
- QCOMPARE(same, fi1 == fi2);
+ QCOMPARE(fi1 == fi2, same);
}
void tst_QFileInfo::consistent_data()