diff options
Diffstat (limited to 'tests/gpg')
| -rw-r--r-- | tests/gpg/Makefile.am | 16 | ||||
| -rw-r--r-- | tests/gpg/t-support.h | 10 | ||||
| -rw-r--r-- | tests/gpg/t-wait.c | 6 | 
3 files changed, 26 insertions, 6 deletions
diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am index 023d2aaa..e5d9de9b 100644 --- a/tests/gpg/Makefile.am +++ b/tests/gpg/Makefile.am @@ -25,11 +25,17 @@ TESTS_ENVIRONMENT = GNUPGHOME=. GPG_AGENT_INFO=  # The keylist tests must come after the import and the edit test.  noinst_HEADERS = t-support.h -TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers	\ -	t-decrypt t-verify t-decrypt-verify t-sig-notation \ -	t-export t-import t-trustlist t-eventloop t-edit \ -	t-keylist t-keylist-sig t-thread1 t-wait t-encrypt-large \ -	t-file-name + +if HAVE_W32_SYSTEM +tests_unix = +else +tests_unix = t-eventloop t-thread1 +endif + +TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers		\ +	t-decrypt t-verify t-decrypt-verify t-sig-notation t-export	\ +	t-import t-trustlist t-edit t-keylist t-keylist-sig t-wait	\ +	t-encrypt-large t-file-name $(tests_unix)  CLEANFILES = secring.gpg pubring.gpg trustdb.gpg  DISTCLEANFILES = pubring.gpg~ random_seed gpg.conf diff --git a/tests/gpg/t-support.h b/tests/gpg/t-support.h index 0ed1ac84..362b857a 100644 --- a/tests/gpg/t-support.h +++ b/tests/gpg/t-support.h @@ -24,6 +24,10 @@  #include <stdlib.h>  #include <locale.h> +#ifdef HAVE_W32_SYSTEM +#include <windows.h> +#endif +  #include <gpgme.h>  #ifndef DIM @@ -65,7 +69,13 @@ gpgme_error_t  passphrase_cb (void *opaque, const char *uid_hint, const char *passphrase_info,  	       int last_was_bad, int fd)  { +#ifdef HAVE_W32_SYSTEM +  DWORD written; +  WriteFile ((HANDLE) fd, "abc\n", 4, &written, 0); +#else    write (fd, "abc\n", 4); +#endif +    return 0;  } diff --git a/tests/gpg/t-wait.c b/tests/gpg/t-wait.c index c12835d7..eec4d96d 100644 --- a/tests/gpg/t-wait.c +++ b/tests/gpg/t-wait.c @@ -1,6 +1,6 @@  /* t-wait.c - Regression test.     Copyright (C) 2000 Werner Koch (dd9jn) -   Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH +   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 g10 Code GmbH     This file is part of GPGME. @@ -29,6 +29,10 @@  #include <stdio.h>  #include <string.h> +#ifdef HAVE_W32_SYSTEM +#define sleep _sleep +#endif +  #include <gpgme.h>  #include "t-support.h"  | 
