Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Bertrand Varin <louisv@unito.io>2017-05-21 20:51:16 +0300
committerLouis-Bertrand Varin <louisv@unito.io>2017-05-21 20:51:16 +0300
commiteeafe7761479068fda7aec772f0dc36a8d5b1422 (patch)
tree97e2e9801ae59d653a25a08f7aab11aff15394b1 /tests/TestGroup.cpp
parent54ad927044439d5852f524edd7837157f43b43ad (diff)
Find entry by title.
Diffstat (limited to 'tests/TestGroup.cpp')
-rw-r--r--tests/TestGroup.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/TestGroup.cpp b/tests/TestGroup.cpp
index 4fb5e4b3b..a706badad 100644
--- a/tests/TestGroup.cpp
+++ b/tests/TestGroup.cpp
@@ -606,9 +606,17 @@ void TestGroup::testFindEntry()
QVERIFY(entry != nullptr);
QCOMPARE(entry->title(), QString("entry2"));
+ // Should also find the entry only by title.
+ entry = db->rootGroup()->findEntry(QString("entry2"));
+ QVERIFY(entry != nullptr);
+ QCOMPARE(entry->title(), QString("entry2"));
+
entry = db->rootGroup()->findEntry(QString("invalid/path/to/entry2"));
QVERIFY(entry == nullptr);
+ entry = db->rootGroup()->findEntry(QString("entry27"));
+ QVERIFY(entry == nullptr);
+
// A valid UUID that does not exist in this database.
entry = db->rootGroup()->findEntry(QString("febfb01ebcdf9dbd90a3f1579dc75281"));
QVERIFY(entry == nullptr);