diff options
author | Werner Koch <[email protected]> | 2004-02-17 17:26:20 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-02-17 17:26:20 +0000 |
commit | 91d3e5aa57bd9a75e77ddbd4753897b6a372c323 (patch) | |
tree | c15ce77f929f69dcbb165711bdf206ac20a73426 /tests/gpgsm | |
parent | * gpgme.texi (Key Listing Mode): Doc KEYLIST_MODE_VALIDATE. (diff) | |
download | gpgme-91d3e5aa57bd9a75e77ddbd4753897b6a372c323.tar.gz gpgme-91d3e5aa57bd9a75e77ddbd4753897b6a372c323.zip |
* gpgsm/t-import.c (check_result): gpgsm does now return info in
the result->imports; adjust for that.
* gpgsm/Makefile.am (TESTS_ENVIRONMENT): Reset the GPG_AGENT_INFO.
* gpg/t-keylist-sig.c (main): s/class/sig_class/.
* gpg/t-signers.c (check_result): Ditto.
* gpg/t-sign.c (check_result): Ditto.
* gpg/t-encrypt-sign.c (check_result): Ditto.
* gpgsm/t-sign.c (check_result): Ditto.
Diffstat (limited to 'tests/gpgsm')
-rw-r--r-- | tests/gpgsm/Makefile.am | 2 | ||||
-rw-r--r-- | tests/gpgsm/t-decrypt.c | 7 | ||||
-rw-r--r-- | tests/gpgsm/t-encrypt.c | 6 | ||||
-rw-r--r-- | tests/gpgsm/t-export.c | 6 | ||||
-rw-r--r-- | tests/gpgsm/t-genkey.c | 6 | ||||
-rw-r--r-- | tests/gpgsm/t-import.c | 17 | ||||
-rw-r--r-- | tests/gpgsm/t-keylist.c | 6 | ||||
-rw-r--r-- | tests/gpgsm/t-sign.c | 10 | ||||
-rw-r--r-- | tests/gpgsm/t-verify.c | 6 |
9 files changed, 62 insertions, 4 deletions
diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am index 71984ff0..ad114a55 100644 --- a/tests/gpgsm/Makefile.am +++ b/tests/gpgsm/Makefile.am @@ -21,7 +21,7 @@ GPGSM = @GPGSM@ -TESTS_ENVIRONMENT = GNUPGHOME=. +TESTS_ENVIRONMENT = GNUPGHOME=. GPG_AGENT_INFO= noinst_HEADERS = t-support.h TESTS = t-import t-keylist t-encrypt t-verify t-decrypt t-sign t-export diff --git a/tests/gpgsm/t-decrypt.c b/tests/gpgsm/t-decrypt.c index ca5757dc..db507f0f 100644 --- a/tests/gpgsm/t-decrypt.c +++ b/tests/gpgsm/t-decrypt.c @@ -18,6 +18,13 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/tests/gpgsm/t-encrypt.c b/tests/gpgsm/t-encrypt.c index ff61394b..a5c2dc1b 100644 --- a/tests/gpgsm/t-encrypt.c +++ b/tests/gpgsm/t-encrypt.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/tests/gpgsm/t-export.c b/tests/gpgsm/t-export.c index ce7dadb8..f876de70 100644 --- a/tests/gpgsm/t-export.c +++ b/tests/gpgsm/t-export.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/tests/gpgsm/t-genkey.c b/tests/gpgsm/t-genkey.c index a4d60c1e..0c67597c 100644 --- a/tests/gpgsm/t-genkey.c +++ b/tests/gpgsm/t-genkey.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/tests/gpgsm/t-import.c b/tests/gpgsm/t-import.c index 43381569..82704922 100644 --- a/tests/gpgsm/t-import.c +++ b/tests/gpgsm/t-import.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -110,11 +116,20 @@ check_result (gpgme_import_result_t result, char *fpr, int total) result->not_imported); exit (1); } - if (result->imports) + + { + int n; + gpgme_import_status_t r; + + for (n=0, r=result->imports; r; r=r->next) + n++; + + if (n != total) { fprintf (stderr, "Unexpected number of status reports\n"); exit (1); } + } } diff --git a/tests/gpgsm/t-keylist.c b/tests/gpgsm/t-keylist.c index cf4073fc..3c38fa77 100644 --- a/tests/gpgsm/t-keylist.c +++ b/tests/gpgsm/t-keylist.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/tests/gpgsm/t-sign.c b/tests/gpgsm/t-sign.c index 2cfac7da..406c72f4 100644 --- a/tests/gpgsm/t-sign.c +++ b/tests/gpgsm/t-sign.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -57,10 +63,10 @@ check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type) result->signatures->hash_algo); exit (1); } - if (result->signatures->class != 0) + if (result->signatures->sig_class != 0) { fprintf (stderr, "Wrong signature class reported: %u\n", - result->signatures->class); + result->signatures->sig_class); exit (1); } if (strcmp ("3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E", diff --git a/tests/gpgsm/t-verify.c b/tests/gpgsm/t-verify.c index 6fb32a94..19652e37 100644 --- a/tests/gpgsm/t-verify.c +++ b/tests/gpgsm/t-verify.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> |