diff options
author | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2015-12-11 13:42:28 +0100 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2016-01-21 05:53:17 +0000 |
commit | f05c597ae506ea6163394dbb6b70ecc77fae3b3c (patch) | |
tree | 02a3b3644bd9c0657aed855d7d348d527cdbefce /tests/auto/corelib/io/qurl | |
parent | f4502fbaf0d31d08bf08f1685f1d7b30735b72b4 (diff) |
winrt: msvc2015: refactor file handling
msvc2015 reintroduced a couple of functions from the win32 API
towards WinRT.
Enable usage of those and simplify the file system engine.
Furthermore update the autotests.
Change-Id: I9eafffba0ddfd05917c184c4a6b9e166f86d71d9
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'tests/auto/corelib/io/qurl')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 519b05f492..b284e5fc9c 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -3013,14 +3013,20 @@ void tst_QUrl::fromUserInputWithCwd_data() it.next(); QUrl url = QUrl::fromLocalFile(it.filePath()); if (it.fileName() == QLatin1String(".")) { - url = QUrl::fromLocalFile(QDir::currentPath()); // fromUserInput cleans the path + url = QUrl::fromLocalFile(QDir::currentPath() +#ifdef Q_OS_WINRT + + QLatin1Char('/') +#endif + ); // fromUserInput cleans the path } QTest::newRow(QString("file-%1").arg(c++).toLatin1()) << it.fileName() << QDir::currentPath() << url << url; } +#ifndef Q_OS_WINRT // WinRT cannot cd outside current / sandbox QDir parent = QDir::current(); QVERIFY(parent.cdUp()); QUrl parentUrl = QUrl::fromLocalFile(parent.path()); QTest::newRow("dotdot") << ".." << QDir::currentPath() << parentUrl << parentUrl; +#endif QTest::newRow("nonexisting") << "nonexisting" << QDir::currentPath() << QUrl("http://nonexisting") << QUrl::fromLocalFile(QDir::currentPath() + "/nonexisting"); QTest::newRow("short-url") << "example.org" << QDir::currentPath() << QUrl("http://example.org") << QUrl::fromLocalFile(QDir::currentPath() + "/example.org"); |