summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-08-29 13:28:48 -0300
committerThiago Macieira <thiago.macieira@intel.com>2022-08-31 16:55:00 -0300
commitf12321288009119552df10df75c77228f6bac0db (patch)
tree7f14b8b2ed813924ba2d4d5f69c379ec2e0b8ad5 /tests/auto/corelib
parent0f2397f03d6dc84ed1157e5a78c3298a1cdd7c85 (diff)
RCC: fix zlib compression when --no-zstd was specified
Since we had code to default to zstd as the default algorithm instead of "Best", we ended up not compressing anything. [ChangeLog][rcc] Fixed a bug that caused rcc not to compress files with any compression algorithm if the --no-zstd option was present. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-106012 Change-Id: Ic6547f8247454b47baa8fffd170fddae429f82d2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 42018219a9..3170d2f452 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -37,6 +37,7 @@ private slots:
void searchPath_data();
void searchPath();
void doubleSlashInRoot();
+ void setLocale_data();
void setLocale();
void lastModified();
void resourcesInStaticPlugins();
@@ -565,13 +566,22 @@ void tst_QResourceEngine::doubleSlashInRoot()
QVERIFY(QFile::exists("://secondary_root/runtime_resource/search_file.txt"));
}
+void tst_QResourceEngine::setLocale_data()
+{
+ QTest::addColumn<QString>("prefix");
+ QTest::newRow("built-in") << QString();
+ QTest::newRow("runtime") << "/runtime_resource/";
+}
+
void tst_QResourceEngine::setLocale()
{
+ QFETCH(QString, prefix);
QLocale::setDefault(QLocale::c());
// default constructed QResource gets the default locale
QResource resource;
- resource.setFileName("aliasdir/aliasdir.txt");
+ resource.setFileName(prefix + "aliasdir/aliasdir.txt");
+ QVERIFY(resource.isValid());
QCOMPARE(resource.compressionAlgorithm(), QResource::NoCompression);
// change the default locale and make sure it doesn't affect the resource