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
path: root/tests
diff options
context:
space:
mode:
authorlouib <code@louib.net>2022-08-21 05:38:58 +0300
committerGitHub <noreply@github.com>2022-08-21 05:38:58 +0300
commit15b9e82f93971a1cd2f63f3b21eafcf3601ec70c (patch)
tree9b809e8c1cc3564fa346472a2e4568bf40aaf7d2 /tests
parentaa839e2619a3e5b035669a58d2335f8826b048ee (diff)
[CLI] Add Option to show all attributes (Show command) (#8256)
* Adding --all option to Show
Diffstat (limited to 'tests')
-rw-r--r--tests/TestCli.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/TestCli.cpp b/tests/TestCli.cpp
index 091c7a3ef..14012cdcd 100644
--- a/tests/TestCli.cpp
+++ b/tests/TestCli.cpp
@@ -2049,6 +2049,21 @@ void TestCli::testShow()
execCmd(showCmd, {"show", m_dbFile->fileName(), "-a", "Testattribute1", "/Sample Entry"});
QCOMPARE(m_stdout->readAll(), QByteArray());
QVERIFY(m_stderr->readAll().contains("ERROR: attribute Testattribute1 is ambiguous"));
+
+ setInput("a");
+ execCmd(showCmd, {"show", "--all", m_dbFile->fileName(), "/Sample Entry"});
+ QCOMPARE(m_stdout->readAll(),
+ QByteArray("Title: Sample Entry\n"
+ "UserName: User Name\n"
+ "Password: PROTECTED\n"
+ "URL: http://www.somesite.com/\n"
+ "Notes: Notes\n"
+ "Uuid: {9f4544c2-ab00-c74a-8a1a-6eaf26cf57e9}\n"
+ "Tags: \n"
+ "TOTP Seed: PROTECTED\n"
+ "TOTP Settings: 30;6\n"
+ "TestAttribute1: b\n"
+ "testattribute1: a\n"));
}
void TestCli::testInvalidDbFiles()