Move test data files into an own subdirectory.

This commit is contained in:
Felix Geyer 2011-11-20 11:10:01 +01:00
parent 9e56b33190
commit e5bba14994
9 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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();

View File

@ -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());

View File

@ -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}"