summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfileinfo
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-05-11 14:10:32 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2010-05-11 14:10:54 (GMT)
commit10f6220cc37207dbc35bd013af727552fb3799f7 (patch)
treeb9fec3441a91a456916d9f3a7b366fe33d8b98a9 /tests/auto/qfileinfo
parentb32a3940f0d23332c73b8e0b60c442cdda91e67e (diff)
downloadQt-10f6220cc37207dbc35bd013af727552fb3799f7.zip
Qt-10f6220cc37207dbc35bd013af727552fb3799f7.tar.gz
Qt-10f6220cc37207dbc35bd013af727552fb3799f7.tar.bz2
Fix the hidden status check for a file on
Mac OS X. Add some more tests that would have failed before the fix. Remove test files after the run. Task-number: QTBUG-6619 Reviewed-by: Morten Sorvig
Diffstat (limited to 'tests/auto/qfileinfo')
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index f61426d..c7dce28 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -190,6 +190,8 @@ tst_QFileInfo::~tst_QFileInfo()
QFile::remove("link.lnk");
QFile::remove("file1");
QFile::remove("dummyfile");
+ QFile::remove("simplefile.txt");
+ QFile::remove("longFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileName.txt");
#ifdef Q_OS_SYMBIAN
QFile::remove("hidden.txt");
QFile::remove("nothidden.txt");
@@ -199,6 +201,7 @@ tst_QFileInfo::~tst_QFileInfo()
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
QDir().rmdir("./.hidden-directory");
+ QFile::remove("link_to_tst_qfileinfo");
#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
QDir().rmdir("./hidden-directory");
@@ -1128,6 +1131,8 @@ void tst_QFileInfo::isHidden_data()
#if defined(Q_OS_MAC)
// /bin has the hidden attribute on Mac OS X
QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << true;
+ QTest::newRow("/dev/") << QString::fromLatin1("/dev/") << true;
+ QTest::newRow("/net/") << QString::fromLatin1("/net/") << true;
#elif !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << false;
#endif