Fix tst_QFile::openDirectory for systems using builtin test data
To obtain "proper" directory behavior, we have to check against the extracted "resources" directory instead of its qrc counterpart. Change-Id: I4996ba74419945f78d356ad953a5b826ff663687 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
This commit is contained in:
parent
82c3c9d45d
commit
579d0cb2be
@ -461,14 +461,15 @@ void tst_QFile::initTestCase()
|
|||||||
QVERIFY(!m_testSourceFile.isEmpty());
|
QVERIFY(!m_testSourceFile.isEmpty());
|
||||||
m_testFile = QFINDTESTDATA("testfile.txt");
|
m_testFile = QFINDTESTDATA("testfile.txt");
|
||||||
QVERIFY(!m_testFile.isEmpty());
|
QVERIFY(!m_testFile.isEmpty());
|
||||||
|
m_resourcesDir = QFINDTESTDATA("resources");
|
||||||
|
QVERIFY(!m_resourcesDir.isEmpty());
|
||||||
#else
|
#else
|
||||||
m_dataDir = QEXTRACTTESTDATA("/");
|
m_dataDir = QEXTRACTTESTDATA("/");
|
||||||
QVERIFY2(!m_dataDir.isNull(), qPrintable("Could not extract test data"));
|
QVERIFY2(!m_dataDir.isNull(), qPrintable("Could not extract test data"));
|
||||||
m_testFile = m_dataDir->path() + "/testfile.txt";
|
m_testFile = m_dataDir->path() + "/testfile.txt";
|
||||||
m_testSourceFile = m_dataDir->path() + "/tst_qfile.cpp";
|
m_testSourceFile = m_dataDir->path() + "/tst_qfile.cpp";
|
||||||
|
m_resourcesDir = m_dataDir->path() + "/resources";
|
||||||
#endif
|
#endif
|
||||||
m_resourcesDir = QFINDTESTDATA("resources");
|
|
||||||
QVERIFY(!m_resourcesDir.isEmpty());
|
|
||||||
m_noEndOfLineFile = QFINDTESTDATA("noendofline.txt");
|
m_noEndOfLineFile = QFINDTESTDATA("noendofline.txt");
|
||||||
QVERIFY(!m_noEndOfLineFile.isEmpty());
|
QVERIFY(!m_noEndOfLineFile.isEmpty());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user