Fix last changes.

This commit is contained in:
Marcus Brinkmann 2003-05-27 08:31:33 +00:00
parent 78c70247f0
commit 64b0e7004f
4 changed files with 7 additions and 9 deletions

View File

@ -2,8 +2,7 @@
* gpg/Makefile.am (TESTS): Order t-keylist and t-keylist-sig after * gpg/Makefile.am (TESTS): Order t-keylist and t-keylist-sig after
t-import. t-import.
* gpg/t-edit.c (edit_fnc): Work around gpg 1.2.2 bug by resetting * gpg/t-edit.c (edit_fnc): Fix primary UID for keylisting tests.
primary uid after setting expiration date.
* gpg/t-keylist.c: Change order of user IDs. * gpg/t-keylist.c: Change order of user IDs.
* gpg/t-keylist-sig.c: Likewise. * gpg/t-keylist-sig.c: Likewise.
* gpg/t-import.c: Add support for gpg in CVS. * gpg/t-import.c: Add support for gpg in CVS.

View File

@ -23,7 +23,7 @@ GPG = @GPG@
TESTS_ENVIRONMENT = GNUPGHOME=. GPG_AGENT_INFO= TESTS_ENVIRONMENT = GNUPGHOME=. GPG_AGENT_INFO=
# The keylist test must come after the import test. # The keylist tests must come after the import and the edit test.
TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \ TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \
t-decrypt t-verify t-decrypt-verify \ t-decrypt t-verify t-decrypt-verify \
t-export t-import t-trustlist t-eventloop t-edit \ t-export t-import t-trustlist t-eventloop t-edit \

View File

@ -93,9 +93,8 @@ edit_fnc (void *opaque, gpgme_status_code_t status, const char *args, int fd)
result = "expire"; result = "expire";
break; break;
/* Work around a bug in GPG 1.2.2, which causes the /* This fixes the primary user ID so the keylisting
primary UID to change when setting the expiration tests will have predictable output. */
date. */
case 2: case 2:
result = "1"; result = "1";
break; break;

View File

@ -107,7 +107,7 @@ check_result (gpgme_import_result_t result, char *fpr, int secret)
} }
if ((secret if ((secret
&& ((result->secret_imported == 0 && result->new_signatures != 0) && ((result->secret_imported == 0 && result->new_signatures != 0)
|| (result->secret_imported == 1 && result->new_signatures != 1))) || (result->secret_imported == 1 && result->new_signatures > 1)))
|| (!secret && result->new_signatures != 0)) || (!secret && result->new_signatures != 0))
{ {
fprintf (stderr, "Unexpected number of new signatures %i\n", fprintf (stderr, "Unexpected number of new signatures %i\n",
@ -199,8 +199,8 @@ check_result (gpgme_import_result_t result, char *fpr, int secret)
{ {
if (result->imports->status if (result->imports->status
!= (GPGME_IMPORT_SECRET | GPGME_IMPORT_NEW) != (GPGME_IMPORT_SECRET | GPGME_IMPORT_NEW)
|| !result->imports->next || (result->imports->next
|| result->imports->next->status != GPGME_IMPORT_SIG) && result->imports->next->status != GPGME_IMPORT_SIG))
{ {
fprintf (stderr, "Unexpected status %i\n", fprintf (stderr, "Unexpected status %i\n",
result->imports->status); result->imports->status);