diff options
author | saturneric <[email protected]> | 2025-02-01 19:08:19 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-02-01 19:08:19 +0000 |
commit | e6b26c2fd5f18927a51a27dafe084e65af74573a (patch) | |
tree | ae24d4a7e916ab3e1aa1d1c7d62f0919833ed518 | |
parent | fix: use yyy-MM-dd format of create date on key list (diff) | |
download | GpgFrontend-e6b26c2fd5f18927a51a27dafe084e65af74573a.tar.gz GpgFrontend-e6b26c2fd5f18927a51a27dafe084e65af74573a.zip |
fix: issues found on unit test mode
-rw-r--r-- | src/cmd.cpp | 1 | ||||
-rw-r--r-- | src/init.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd.cpp b/src/cmd.cpp index dca88cf3..97934abc 100644 --- a/src/cmd.cpp +++ b/src/cmd.cpp @@ -233,6 +233,7 @@ auto RunTest(const GFCxtWPtr& p_ctx) -> int { .GetTaskRunner(Thread::TaskRunnerGetter::kTaskRunnerType_Default) ->PostTask(task); + ctx->rtn = kNonRestartCode; looper.exec(); return 0; } diff --git a/src/init.cpp b/src/init.cpp index 8ab49f08..71f24668 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -183,7 +183,7 @@ void ShutdownGlobalBasicEnv(const GFCxtWPtr &p_ctx) { .value("gnupg/kill_all_gnupg_daemon_at_close", false) .toBool(); - if (!ctx->unit_test_mode && kill_all_gnupg_daemon_at_close) { + if (ctx->unit_test_mode || kill_all_gnupg_daemon_at_close) { GpgAdvancedOperator::KillAllGpgComponents(nullptr); } else if (!ctx->unit_test_mode && clear_gpg_password_cache) { GpgAdvancedOperator::ClearGpgPasswordCache(nullptr); |