winrt: update tests
Update due to behavior differences between win32 and winrt. Change-Id: I39532de98c25cd67da49cbb20d42dccc803f1805 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
bd79c4e28c
commit
39def876a6
@ -155,10 +155,12 @@ private slots:
|
|||||||
void copyRemovesTemporaryFile() const;
|
void copyRemovesTemporaryFile() const;
|
||||||
void copyShouldntOverwrite();
|
void copyShouldntOverwrite();
|
||||||
void copyFallback();
|
void copyFallback();
|
||||||
|
#ifndef Q_OS_WINRT
|
||||||
void link();
|
void link();
|
||||||
void linkToDir();
|
void linkToDir();
|
||||||
void absolutePathLinkToRelativePath();
|
void absolutePathLinkToRelativePath();
|
||||||
void readBrokenLink();
|
void readBrokenLink();
|
||||||
|
#endif
|
||||||
void readTextFile_data();
|
void readTextFile_data();
|
||||||
void readTextFile();
|
void readTextFile();
|
||||||
void readTextFile2();
|
void readTextFile2();
|
||||||
@ -568,7 +570,7 @@ void tst_QFile::open()
|
|||||||
QSKIP("Running this test as root doesn't make sense");
|
QSKIP("Running this test as root doesn't make sense");
|
||||||
#endif
|
#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);
|
QEXPECT_FAIL("noreadfile", "Windows does not currently support non-readable files.", Abort);
|
||||||
#endif
|
#endif
|
||||||
if (filename.isEmpty())
|
if (filename.isEmpty())
|
||||||
@ -1226,7 +1228,7 @@ void tst_QFile::permissions()
|
|||||||
QFile::remove(file);
|
QFile::remove(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||||
if (qt_ntfs_permission_lookup)
|
if (qt_ntfs_permission_lookup)
|
||||||
QEXPECT_FAIL("readonly", "QTBUG-25630", Abort);
|
QEXPECT_FAIL("readonly", "QTBUG-25630", Abort);
|
||||||
#endif
|
#endif
|
||||||
@ -1413,6 +1415,7 @@ static QString getWorkingDirectoryForLink(const QString &linkFileName)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef Q_OS_WINRT
|
||||||
void tst_QFile::link()
|
void tst_QFile::link()
|
||||||
{
|
{
|
||||||
QFile::remove("myLink.lnk");
|
QFile::remove("myLink.lnk");
|
||||||
@ -1433,7 +1436,7 @@ void tst_QFile::link()
|
|||||||
|
|
||||||
QCOMPARE(QFile::symLinkTarget("myLink.lnk"), referenceTarget);
|
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());
|
QString wd = getWorkingDirectoryForLink(info2.absoluteFilePath());
|
||||||
QCOMPARE(QDir::fromNativeSeparators(wd), QDir::cleanPath(info1.absolutePath()));
|
QCOMPARE(QDir::fromNativeSeparators(wd), QDir::cleanPath(info1.absolutePath()));
|
||||||
#endif
|
#endif
|
||||||
@ -1487,6 +1490,7 @@ void tst_QFile::readBrokenLink()
|
|||||||
QVERIFY(QFile::link("ole/..", "myLink2.lnk"));
|
QVERIFY(QFile::link("ole/..", "myLink2.lnk"));
|
||||||
QCOMPARE(QFileInfo("myLink2.lnk").symLinkTarget(), QDir::currentPath());
|
QCOMPARE(QFileInfo("myLink2.lnk").symLinkTarget(), QDir::currentPath());
|
||||||
}
|
}
|
||||||
|
#endif // Q_OS_WINRT
|
||||||
|
|
||||||
void tst_QFile::readTextFile_data()
|
void tst_QFile::readTextFile_data()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user