summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp')
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 5764cee66d..7ca41d3bf3 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1362,7 +1362,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
QString junction = "junction_pwd";
FileSystem::createNtfsJunction(target, junction);
QFileInfo targetInfo(target);
- QTest::newRow("junction_pwd") << junction << true << targetInfo.absoluteFilePath() << targetInfo.canonicalFilePath();
+ QTest::newRow("junction_pwd") << junction << false << QString() << QString();
QFileInfo fileInJunction(targetInfo.absoluteFilePath().append("/file"));
QFile file(fileInJunction.absoluteFilePath());
@@ -1375,7 +1375,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
junction = "junction_root";
FileSystem::createNtfsJunction(target, junction);
targetInfo.setFile(target);
- QTest::newRow("junction_root") << junction << true << targetInfo.absoluteFilePath() << targetInfo.canonicalFilePath();
+ QTest::newRow("junction_root") << junction << false << QString() << QString();
//Mountpoint
typedef BOOLEAN (WINAPI *PtrGetVolumeNameForVolumeMountPointW)(LPCWSTR, LPWSTR, DWORD);
@@ -1390,7 +1390,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
junction = "mountpoint";
rootVolume.replace("\\\\?\\","\\??\\");
FileSystem::createNtfsJunction(rootVolume, junction);
- QTest::newRow("mountpoint") << junction << true << QDir::fromNativeSeparators(rootPath) << QDir::rootPath();
+ QTest::newRow("mountpoint") << junction << false << QString() << QString();
}
}
@@ -1403,8 +1403,10 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks()
QFileInfo fi(path);
QCOMPARE(fi.isSymLink(), isSymLink);
- QCOMPARE(fi.symLinkTarget(), linkTarget);
- QCOMPARE(fi.canonicalFilePath(), canonicalFilePath);
+ if (isSymLink) {
+ QCOMPARE(fi.symLinkTarget(), linkTarget);
+ QCOMPARE(fi.canonicalFilePath(), canonicalFilePath);
+ }
}
void tst_QFileInfo::brokenShortcut()