From 39def876a641e0fff42298c61bbe3d3fafaf47af Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 9 Aug 2016 11:58:31 +0200 Subject: [PATCH] winrt: update tests Update due to behavior differences between win32 and winrt. Change-Id: I39532de98c25cd67da49cbb20d42dccc803f1805 Reviewed-by: Oliver Wolff --- tests/auto/corelib/io/qfile/tst_qfile.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 4c9986d50e..68d7a4fe5f 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -155,10 +155,12 @@ private slots: void copyRemovesTemporaryFile() const; void copyShouldntOverwrite(); void copyFallback(); +#ifndef Q_OS_WINRT void link(); void linkToDir(); void absolutePathLinkToRelativePath(); void readBrokenLink(); +#endif void readTextFile_data(); void readTextFile(); void readTextFile2(); @@ -568,7 +570,7 @@ void tst_QFile::open() QSKIP("Running this test as root doesn't make sense"); #endif -#if defined(Q_OS_WIN32) +#if defined(Q_OS_WIN32) || defined(Q_OS_WINRT) QEXPECT_FAIL("noreadfile", "Windows does not currently support non-readable files.", Abort); #endif if (filename.isEmpty()) @@ -1226,7 +1228,7 @@ void tst_QFile::permissions() QFile::remove(file); } -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) if (qt_ntfs_permission_lookup) QEXPECT_FAIL("readonly", "QTBUG-25630", Abort); #endif @@ -1413,6 +1415,7 @@ static QString getWorkingDirectoryForLink(const QString &linkFileName) } #endif +#ifndef Q_OS_WINRT void tst_QFile::link() { QFile::remove("myLink.lnk"); @@ -1433,7 +1436,7 @@ void tst_QFile::link() QCOMPARE(QFile::symLinkTarget("myLink.lnk"), referenceTarget); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QString wd = getWorkingDirectoryForLink(info2.absoluteFilePath()); QCOMPARE(QDir::fromNativeSeparators(wd), QDir::cleanPath(info1.absolutePath())); #endif @@ -1487,6 +1490,7 @@ void tst_QFile::readBrokenLink() QVERIFY(QFile::link("ole/..", "myLink2.lnk")); QCOMPARE(QFileInfo("myLink2.lnk").symLinkTarget(), QDir::currentPath()); } +#endif // Q_OS_WINRT void tst_QFile::readTextFile_data() {