diff options
Diffstat (limited to 'lang/cpp/tests/run-getkey.cpp')
-rw-r--r-- | lang/cpp/tests/run-getkey.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lang/cpp/tests/run-getkey.cpp b/lang/cpp/tests/run-getkey.cpp index 67ca281c..c47da0b5 100644 --- a/lang/cpp/tests/run-getkey.cpp +++ b/lang/cpp/tests/run-getkey.cpp @@ -140,6 +140,12 @@ main (int argc, char **argv) return -1; } ctx->setKeyListMode (mode); + if (ctx->keyListMode() != mode) { + // unfortunately, Context::setKeyListMode() does not return the error + // returned by gpgme + std::cerr << "Failed to set keylist mode. You may have used an invalid combination of options."; + return -1; + } Error err; const GpgME::Key key = ctx->key (*argv, err, only_secret); std::stringstream ss; |