diff options
Diffstat (limited to 'tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp')
-rw-r--r-- | tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp index 3f0e68c1b8..ffa7bab6d9 100644 --- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp @@ -29,6 +29,7 @@ #include <QtTest/QtTest> #include <QtCore/QCoreApplication> +#include <QtCore/QMimeDatabase> class tst_QResourceEngine: public QObject { @@ -127,9 +128,19 @@ void tst_QResourceEngine::checkStructure_data() rootContents.insert(1, QLatin1String("android_testdata")); #endif +#if defined(BUILTIN_TESTDATA) + rootContents.insert(8, QLatin1String("testqrc")); +#endif + + QTest::newRow("root dir") << QString(":/") << QString() - << (QStringList() << "search_file.txt") + << (QStringList() +#if defined(BUILTIN_TESTDATA) + << "parentdir.txt" + << "runtime_resource.rcc" +#endif + << "search_file.txt") << rootContents << QLocale::c() << qlonglong(0); @@ -336,6 +347,11 @@ void tst_QResourceEngine::checkStructure() QFETCH(QLocale, locale); QFETCH(qlonglong, contentsSize); + // We rely on the existence of the root "qt-project.org" in resources. For + // static builds on MSVC these resources are only added if they are used. + QMimeDatabase db; + Q_UNUSED(db); + bool directory = (containedDirs.size() + containedFiles.size() > 0); QLocale::setDefault(locale); |