summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-09-08 19:20:12 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2010-09-09 09:36:35 (GMT)
commit97e8a289380202da7041e40574d58b08a91e0fd0 (patch)
tree6b34d2c209f00d9596937c1b97f14c30645c679b /tests/auto
parente4de050cc8e819a2751f94ac0429a0d7fe64e64a (diff)
downloadQt-97e8a289380202da7041e40574d58b08a91e0fd0.zip
Qt-97e8a289380202da7041e40574d58b08a91e0fd0.tar.gz
Qt-97e8a289380202da7041e40574d58b08a91e0fd0.tar.bz2
Fixes for tst_qfileinfo
Use case insensitive comparison on symbian/windows for the absFilePath test. - it expected "c:\\home\\andy\\tmp.txt" to resolve to "C:/home/andy/tmp.txt" - but there is no reason for the drive letter to be changed to uppercase - however it's not wrong either since the FS is case insensitive. Enable isWritable test on symbian - it was skipped for no good reason Reviewed-By: joao
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index 9ec0572..08cb68d 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -514,7 +514,11 @@ void tst_QFileInfo::absFilePath()
QFETCH(QString, expected);
QFileInfo fi(file);
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+ QVERIFY(QString::compare(fi.absoluteFilePath(), expected, Qt::CaseInsensitive) == 0);
+#else
QCOMPARE(fi.absoluteFilePath(), expected);
+#endif
}
void tst_QFileInfo::canonicalPath()
@@ -1432,10 +1436,6 @@ void tst_QFileInfo::brokenShortcut()
void tst_QFileInfo::isWritable()
{
-#ifdef Q_OS_SYMBIAN
- QSKIP("Currently skipped on Symbian OS, but surely there is a writeable file somewhere???", SkipAll);
-#endif
-
QFile tempfile("tempfile.txt");
tempfile.open(QIODevice::WriteOnly);
tempfile.write("This file is generated by the QFileInfo autotest.");
@@ -1453,7 +1453,7 @@ void tst_QFileInfo::isWritable()
QVERIFY(fi.exists());
QVERIFY(!fi.isWritable());
#endif
-#ifdef Q_OS_UNIX
+#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
if (::getuid() == 0)
QVERIFY(QFileInfo("/etc/passwd").isWritable());
else