diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-08-14 08:18:47 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-08-14 08:18:47 (GMT) |
commit | 6b1724337bf0e7b47a87a6b65d04e9967cc47db6 (patch) | |
tree | af3d834c26740a832d01de05b3a0a17c9aa6491d /tests/auto/qdir/tst_qdir.cpp | |
parent | 0b2ee937495f2746816676d094be42b674eed900 (diff) | |
download | Qt-6b1724337bf0e7b47a87a6b65d04e9967cc47db6.zip Qt-6b1724337bf0e7b47a87a6b65d04e9967cc47db6.tar.gz Qt-6b1724337bf0e7b47a87a6b65d04e9967cc47db6.tar.bz2 |
Fixed qdir autotest for Symbian
Diffstat (limited to 'tests/auto/qdir/tst_qdir.cpp')
-rw-r--r-- | tests/auto/qdir/tst_qdir.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp index ef31f53..13e8c95 100644 --- a/tests/auto/qdir/tst_qdir.cpp +++ b/tests/auto/qdir/tst_qdir.cpp @@ -60,6 +60,12 @@ #define Q_NO_SYMLINKS #endif +#if defined(Q_OS_SYMBIAN) +// Open C in Symbian doesn't support symbolic links to directories +#define Q_NO_SYMLINKS_TO_DIRS +#endif + + //TESTED_CLASS= //TESTED_FILES= @@ -183,11 +189,20 @@ void tst_QDir::getSetCheck() tst_QDir::tst_QDir() { +#ifdef Q_OS_SYMBIAN + // Can't deploy empty test dir, so create it here + QDir dir(SRCDIR); + dir.mkdir("testData"); +#endif } tst_QDir::~tst_QDir() { - +#ifdef Q_OS_SYMBIAN + // Remove created test dir + QDir dir(SRCDIR); + dir.rmdir("testData"); +#endif } void tst_QDir::construction() @@ -707,21 +722,23 @@ void tst_QDir::entryListSimple() void tst_QDir::entryListWithSymLinks() { #ifndef Q_NO_SYMLINKS +# ifndef Q_NO_SYMLINKS_TO_DIRS QFile::remove("myLinkToDir.lnk"); +# endif QFile::remove("myLinkToFile.lnk"); QFile::remove("testfile.cpp"); QDir dir; dir.mkdir("myDir"); QFile("testfile.cpp").open(QIODevice::WriteOnly); -#if !defined(Q_OS_SYMBIAN) +# ifndef Q_NO_SYMLINKS_TO_DIRS QVERIFY(QFile::link("myDir", "myLinkToDir.lnk")); -#endif +# endif QVERIFY(QFile::link("testfile.cpp", "myLinkToFile.lnk")); { QStringList entryList = QDir().entryList(); QVERIFY(entryList.contains("myDir")); -#if !defined(Q_OS_SYMBIAN) +# ifndef Q_NO_SYMLINKS_TO_DIRS QVERIFY(entryList.contains("myLinkToDir.lnk")); #endif QVERIFY(entryList.contains("myLinkToFile.lnk")); @@ -729,7 +746,7 @@ void tst_QDir::entryListWithSymLinks() { QStringList entryList = QDir().entryList(QDir::Dirs); QVERIFY(entryList.contains("myDir")); -#if !defined(Q_OS_SYMBIAN) +# ifndef Q_NO_SYMLINKS_TO_DIRS QVERIFY(entryList.contains("myLinkToDir.lnk")); #endif #if defined(Q_OS_SYMBIAN) |