mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Add delete-entry command to Browser Integration API
This commit is contained in:
committed by
Jonathan White
parent
e3c7b570ae
commit
4c10e516c3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||
* Copyright (C) 2021 KeePassXC Team <team@keepassxc.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -88,3 +88,20 @@ void TestTools::testEnvSubstitute()
|
||||
QCOMPARE(Tools::envSubstitute("start/$EMPTY$$EMPTY$HOME/end", environment), QString("start/$/home/user/end"));
|
||||
#endif
|
||||
}
|
||||
|
||||
void TestTools::testValidUuid()
|
||||
{
|
||||
auto validUuid = Tools::uuidToHex(QUuid::createUuid());
|
||||
auto nonValidUuid = "1234567890abcdef1234567890abcdef";
|
||||
auto emptyUuid = QString();
|
||||
auto shortUuid = validUuid.left(10);
|
||||
auto longUuid = validUuid + "baddata";
|
||||
auto nonHexUuid = Tools::uuidToHex(QUuid::createUuid()).replace(0, 1, 'p');
|
||||
|
||||
QVERIFY(Tools::isValidUuid(validUuid));
|
||||
QVERIFY(not Tools::isValidUuid(nonValidUuid));
|
||||
QVERIFY(not Tools::isValidUuid(emptyUuid));
|
||||
QVERIFY(not Tools::isValidUuid(shortUuid));
|
||||
QVERIFY(not Tools::isValidUuid(longUuid));
|
||||
QVERIFY(not Tools::isValidUuid(nonHexUuid));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
|
||||
* Copyright (C) 2021 KeePassXC Team <team@keepassxc.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -28,6 +28,7 @@ private slots:
|
||||
void testIsHex();
|
||||
void testIsBase64();
|
||||
void testEnvSubstitute();
|
||||
void testValidUuid();
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_TESTTOOLS_H
|
||||
|
||||
Reference in New Issue
Block a user