tests: Add diagnostic example to run-import.c
* tests/run-import.c (main): Show diagnostics in verbose mode.
This commit is contained in:
parent
66376f3e20
commit
ce327f994a
@ -125,6 +125,20 @@ main (int argc, char **argv)
|
|||||||
gpgme_data_release (data);
|
gpgme_data_release (data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
{
|
||||||
|
gpgme_data_t log;
|
||||||
|
char *buf;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
gpgme_data_new (&log);
|
||||||
|
err = gpgme_op_getauditlog (ctx, log, GPGME_AUDITLOG_DIAG);
|
||||||
|
fail_if_err (err);
|
||||||
|
buf = gpgme_data_release_and_get_mem (log, &len);
|
||||||
|
printf ("\nDiagnostic output:\n%.*s\n", len, buf);
|
||||||
|
free (buf);
|
||||||
|
}
|
||||||
|
|
||||||
gpgme_release (ctx);
|
gpgme_release (ctx);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user