mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-04 13:07:38 +03:00
Add support for gzip compressed databases.
This commit is contained in:
parent
f0e711ac23
commit
b8dfb9cc4d
13 changed files with 1290 additions and 11 deletions
|
@ -31,6 +31,7 @@ class TestKeePass2Reader : public QObject
|
|||
private Q_SLOTS:
|
||||
void initTestCase();
|
||||
void testNonAscii();
|
||||
void testCompressed();
|
||||
};
|
||||
|
||||
void TestKeePass2Reader::initTestCase()
|
||||
|
@ -50,6 +51,18 @@ void TestKeePass2Reader::testNonAscii()
|
|||
QCOMPARE(db->metadata()->name(), QString("NonAsciiTest"));
|
||||
}
|
||||
|
||||
void TestKeePass2Reader::testCompressed()
|
||||
{
|
||||
QString filename = QString(KEEPASSX_TEST_DIR).append("/Compressed.kdbx");
|
||||
CompositeKey key;
|
||||
key.addKey(PasswordKey(""));
|
||||
KeePass2Reader* reader = new KeePass2Reader();
|
||||
Database* db = reader->readDatabase(filename, key);
|
||||
QVERIFY(db);
|
||||
QVERIFY(!reader->error());
|
||||
QCOMPARE(db->metadata()->name(), QString("Compressed"));
|
||||
}
|
||||
|
||||
QTEST_MAIN(TestKeePass2Reader);
|
||||
|
||||
#include "TestKeePass2Reader.moc"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue