mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Move test data files into an own subdirectory.
This commit is contained in:
parent
9e56b33190
commit
e5bba14994
@ -18,7 +18,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
add_definitions(-DQT_TEST_LIB)
|
||||
|
||||
set( KEEPASSX_TEST_TREE ${CMAKE_SOURCE_DIR}/tests )
|
||||
set( KEEPASSX_TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data )
|
||||
configure_file( config-keepassx-tests.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keepassx-tests.h )
|
||||
|
||||
MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
|
||||
|
@ -34,7 +34,7 @@ void TestKeePass2Reader::initTestCase()
|
||||
|
||||
void TestKeePass2Reader::testNonAscii()
|
||||
{
|
||||
QString filename = QString(KEEPASSX_TEST_DIR).append("/NonAscii.kdbx");
|
||||
QString filename = QString(KEEPASSX_TEST_DATA_DIR).append("/NonAscii.kdbx");
|
||||
CompositeKey key;
|
||||
key.addKey(PasswordKey(QString::fromUtf8("\xce\x94\xc3\xb6\xd8\xb6")));
|
||||
KeePass2Reader* reader = new KeePass2Reader();
|
||||
@ -49,7 +49,7 @@ void TestKeePass2Reader::testNonAscii()
|
||||
|
||||
void TestKeePass2Reader::testCompressed()
|
||||
{
|
||||
QString filename = QString(KEEPASSX_TEST_DIR).append("/Compressed.kdbx");
|
||||
QString filename = QString(KEEPASSX_TEST_DATA_DIR).append("/Compressed.kdbx");
|
||||
CompositeKey key;
|
||||
key.addKey(PasswordKey(""));
|
||||
KeePass2Reader* reader = new KeePass2Reader();
|
||||
@ -64,7 +64,7 @@ void TestKeePass2Reader::testCompressed()
|
||||
|
||||
void TestKeePass2Reader::testProtectedStrings()
|
||||
{
|
||||
QString filename = QString(KEEPASSX_TEST_DIR).append("/ProtectedStrings.kdbx");
|
||||
QString filename = QString(KEEPASSX_TEST_DATA_DIR).append("/ProtectedStrings.kdbx");
|
||||
CompositeKey key;
|
||||
key.addKey(PasswordKey("masterpw"));
|
||||
KeePass2Reader* reader = new KeePass2Reader();
|
||||
|
@ -64,7 +64,7 @@ QDateTime TestKeePass2XmlReader::genDT(int year, int month, int day, int hour, i
|
||||
void TestKeePass2XmlReader::initTestCase()
|
||||
{
|
||||
KeePass2XmlReader* reader = new KeePass2XmlReader();
|
||||
QString xmlFile = QString(KEEPASSX_TEST_DIR).append("/NewDatabase.xml");
|
||||
QString xmlFile = QString(KEEPASSX_TEST_DATA_DIR).append("/NewDatabase.xml");
|
||||
m_db = reader->readDatabase(xmlFile);
|
||||
QVERIFY(m_db);
|
||||
QVERIFY(!reader->error());
|
||||
|
@ -1,3 +1,3 @@
|
||||
/* config-keepassx-tests.h. Generated by cmake from config-keepassx-tests.h.cmake */
|
||||
|
||||
#define KEEPASSX_TEST_DIR "${KEEPASSX_TEST_TREE}"
|
||||
#define KEEPASSX_TEST_DATA_DIR "${KEEPASSX_TEST_DATA_DIR}"
|
||||
|
Loading…
Reference in New Issue
Block a user