mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-21 01:21:37 -08:00
Fix CLI output when using clip with the -t flag
if you use the CLI with -t/--totp flag, the program prints out: "Entry's "password" attribute copied to the clipboard!" expected output is "Entry's "totp" attribute copied to the clipboard!" the same when you run with -a totp
This commit is contained in:
1 parent
f95019964e
commit
8654b25e80
2 files changed
+2
No files matched your search
@@ -116,6 +116,7 @@ int Clip::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer<
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
selectedAttribute = "totp";
|
||||
found = true;
|
||||
value = entry->totp();
|
||||
} else if (Utils::EntryFieldNames.contains(selectedAttribute)) {
|
||||
|
||||
@@ -671,6 +671,7 @@ void TestCli::testClip()
|
||||
setInput("a");
|
||||
execCmd(clipCmd, {"clip", m_dbFile->fileName(), "/Sample Entry", "0", "--totp"});
|
||||
QTRY_VERIFY(isTotp(clipboard->text()));
|
||||
QCOMPARE(m_stdout->readLine(), QByteArray("Entry's \"totp\" attribute copied to the clipboard!\n"));
|
||||
|
||||
// Test Unicode
|
||||
setInput("a");
|
||||
|
||||
Reference in new issue
Block a user