From e029fd27350fcbda1b4689bc557e996d749d78ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 5 May 2022 17:19:39 +0200 Subject: [PATCH] cpp,tests: Actually parse the --with-secret option * lang/cpp/tests/run-keylist.cpp (main): Handle --with-secret option. Print error for unknown option. -- The --with-secret option was already listed in the help. Now it also works. GnuPG-bug-id: 5965 --- lang/cpp/tests/run-keylist.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lang/cpp/tests/run-keylist.cpp b/lang/cpp/tests/run-keylist.cpp index 852e321d..9e7d763c 100644 --- a/lang/cpp/tests/run-keylist.cpp +++ b/lang/cpp/tests/run-keylist.cpp @@ -119,6 +119,9 @@ main (int argc, char **argv) } else if (!strcmp (*argv, "--locate")) { argc--; argv++; mode |= KeyListMode::Locate; + } else if (!strcmp (*argv, "--with-secret")) { + argc--; argv++; + mode |= KeyListMode::WithSecret; } else if (!strcmp (*argv, "--force-extern")) { argc--; argv++; mode |= KeyListMode::ForceExtern; @@ -126,6 +129,7 @@ main (int argc, char **argv) argc--; argv++; mode |= KeyListMode::LocateExternal; } else if (!strncmp (*argv, "--", 2)) { + std::cerr << "Error: Unknown option: " << *argv << std::endl; show_usage (1); } }