* gpg/Makefile.am (TESTS): Order t-keylist and t-keylist-sig after
t-import.
- * gpg/t-edit.c (edit_fnc): Work around gpg 1.2.2 bug by resetting
- primary uid after setting expiration date.
+ * gpg/t-edit.c (edit_fnc): Fix primary UID for keylisting tests.
* gpg/t-keylist.c: Change order of user IDs.
* gpg/t-keylist-sig.c: Likewise.
* gpg/t-import.c: Add support for gpg in CVS.
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 \
t-decrypt t-verify t-decrypt-verify \
t-export t-import t-trustlist t-eventloop t-edit \
result = "expire";
break;
- /* Work around a bug in GPG 1.2.2, which causes the
- primary UID to change when setting the expiration
- date. */
+ /* This fixes the primary user ID so the keylisting
+ tests will have predictable output. */
case 2:
result = "1";
break;
}
if ((secret
&& ((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))
{
fprintf (stderr, "Unexpected number of new signatures %i\n",
{
if (result->imports->status
!= (GPGME_IMPORT_SECRET | GPGME_IMPORT_NEW)
- || !result->imports->next
- || result->imports->next->status != GPGME_IMPORT_SIG)
+ || (result->imports->next
+ && result->imports->next->status != GPGME_IMPORT_SIG))
{
fprintf (stderr, "Unexpected status %i\n",
result->imports->status);