summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfileinfo
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2010-04-13 07:21:03 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2010-04-13 09:00:51 (GMT)
commit9ff487380399f47b83b959d78f9ea589d715ecb8 (patch)
tree120e95ecdebc13760a16333ad986c16a8b8f147f /tests/auto/qfileinfo
parentadd41080b9a4e2319007063bd73447f336933e9e (diff)
downloadQt-9ff487380399f47b83b959d78f9ea589d715ecb8.zip
Qt-9ff487380399f47b83b959d78f9ea589d715ecb8.tar.gz
Qt-9ff487380399f47b83b959d78f9ea589d715ecb8.tar.bz2
Removed broken tests from tst_QFileInfo::isSymlink_data()
As long as we don't fully support NTFS junctions and volume ids, these tests would always fail. Further they rely on directories that are not available on Win7 anymore. Reviewed-by: Joao
Diffstat (limited to 'tests/auto/qfileinfo')
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index 42e7250..eba04d9 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -194,6 +194,9 @@ tst_QFileInfo::~tst_QFileInfo()
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
QDir().rmdir("./.hidden-directory");
#endif
+#ifdef Q_OS_WIN
+ QDir().rmdir("./hidden-directory");
+#endif
}
// Testing get/set functions
@@ -1056,14 +1059,6 @@ void tst_QFileInfo::isSymLink_data()
QTest::newRow("existent file") << SRCDIR "tst_qfileinfo.cpp" << false << "";
QTest::newRow("link") << "link.lnk" << true << QFileInfo(SRCDIR "tst_qfileinfo.cpp").absoluteFilePath();
QTest::newRow("broken link") << "brokenlink.lnk" << true << QFileInfo("dummyfile").absoluteFilePath();
-
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- if (QSysInfo::WindowsVersion & QSysInfo::WV_VISTA) {
- QTest::newRow("Documents and Settings") << "C:/Documents and Settings" << true << "C:/Users";
- QTest::newRow("All Users") << "C:/Users/All Users" << true << "C:/ProgramData";
- QTest::newRow("Default User") << "C:/Users/Default User" << true << "C:/Users/Default";
- }
-#endif
}
void tst_QFileInfo::isSymLink()
@@ -1086,9 +1081,10 @@ void tst_QFileInfo::isHidden_data()
}
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- QTest::newRow("C:/RECYCLER") << QString::fromLatin1("C:/RECYCLER") << true;
- QTest::newRow("C:/RECYCLER/.") << QString::fromLatin1("C:/RECYCLER/.") << true;
- QTest::newRow("C:/RECYCLER/..") << QString::fromLatin1("C:/RECYCLER/..") << true;
+ QVERIFY(QDir("./hidden-directory").exists() || QDir().mkdir("./hidden-directory"));
+ QVERIFY(SetFileAttributesW(QString("./hidden-directory").utf16(),FILE_ATTRIBUTE_HIDDEN));
+ QTest::newRow("C:/path/to/hidden-directory") << QDir::currentPath() + QString::fromLatin1("/hidden-directory") << true;
+ QTest::newRow("C:/path/to/hidden-directory/.") << QDir::currentPath() + QString::fromLatin1("/hidden-directory/.") << true;
#endif
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)