mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-04 16:25:27 +08:00
qt 6.6.0 clean
This commit is contained in:
@ -31,6 +31,17 @@ qt_internal_add_test(tst_qresourceengine
|
||||
TESTDATA ${test_data}
|
||||
)
|
||||
|
||||
set_source_files_properties("world.txt"
|
||||
PROPERTIES QT_DISCARD_FILE_CONTENTS TRUE
|
||||
)
|
||||
|
||||
qt_internal_add_resource(tst_qresourceengine "qt_resource_empty"
|
||||
PREFIX
|
||||
"/empty"
|
||||
FILES
|
||||
"world.txt"
|
||||
)
|
||||
|
||||
qt_add_resources(additional_sources testqrc/test.qrc)
|
||||
target_sources(tst_qresourceengine PRIVATE ${additional_sources})
|
||||
|
||||
|
@ -41,6 +41,7 @@ private slots:
|
||||
void setLocale();
|
||||
void lastModified();
|
||||
void resourcesInStaticPlugins();
|
||||
void qtResourceEmpty();
|
||||
|
||||
private:
|
||||
const QString m_runtimeResourceRcc;
|
||||
@ -168,6 +169,7 @@ void tst_QResourceEngine::checkStructure_data()
|
||||
#ifdef Q_OS_ANDROID
|
||||
<< QLatin1String("android_testdata")
|
||||
#endif
|
||||
<< QLatin1String("empty")
|
||||
<< QLatin1String("otherdir")
|
||||
<< QLatin1String("runtime_resource")
|
||||
<< QLatin1String("searchpath1")
|
||||
@ -620,6 +622,14 @@ void tst_QResourceEngine::resourcesInStaticPlugins()
|
||||
QVERIFY(QFile::exists(":/staticplugin/main.cpp"));
|
||||
}
|
||||
|
||||
void tst_QResourceEngine::qtResourceEmpty()
|
||||
{
|
||||
QFile f(":/empty/world.txt");
|
||||
QVERIFY(f.exists());
|
||||
QVERIFY(f.open(QIODevice::ReadOnly));
|
||||
QVERIFY(f.readAll().isEmpty());
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QResourceEngine)
|
||||
|
||||
#include "tst_qresourceengine.moc"
|
||||
|
1
tests/auto/corelib/io/qresourceengine/world.txt
Normal file
1
tests/auto/corelib/io/qresourceengine/world.txt
Normal file
@ -0,0 +1 @@
|
||||
hello
|
Reference in New Issue
Block a user