aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/gpg/t-gpgconf.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/gpg/t-gpgconf.c b/tests/gpg/t-gpgconf.c
index 67bb8861..8c81de69 100644
--- a/tests/gpg/t-gpgconf.c
+++ b/tests/gpg/t-gpgconf.c
@@ -263,6 +263,23 @@ main (void)
err = gpgme_new (&ctx);
fail_if_err (err);
+ /* Let's check getting the agent-socket directory for different homedirs. */
+ char *result1 = NULL;
+ err = gpgme_ctx_set_engine_info (ctx, GPGME_PROTOCOL_GPGCONF, NULL, "/tmp/foo");
+ fail_if_err (err);
+ err = gpgme_op_conf_dir (ctx, "agent-socket", &result1);
+ fail_if_err (err);
+
+ char *result2 = NULL;
+ err = gpgme_ctx_set_engine_info (ctx, GPGME_PROTOCOL_GPGCONF, NULL, NULL);
+ fail_if_err (err);
+ err = gpgme_op_conf_dir (ctx, "agent-socket", &result2);
+ fail_if_err (err);
+
+ /* They have to be different. */
+ test (strcmp(result1, result2));
+
+
err = gpgme_op_conf_load (ctx, &conf);
fail_if_err (err);