summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorIngo Klöcker <dev@ingo-kloecker.de>2022-05-05 17:19:39 +0200
committerIngo Klöcker <dev@ingo-kloecker.de>2022-05-05 17:24:59 +0200
commite029fd27350fcbda1b4689bc557e996d749d78ac (patch)
tree3e907f301c0f0317dfa86b0be426eb71028e6cc0 /lang
parent9e8c8e448ec83c454fb310f80ce0bf9f828a7145 (diff)
downloadgpgme-e029fd27350fcbda1b4689bc557e996d749d78ac.tar.gz
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
Diffstat (limited to 'lang')
-rw-r--r--lang/cpp/tests/run-keylist.cpp4
1 files changed, 4 insertions, 0 deletions
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);
}
}