1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

common: Improve t-zb32 to be used for manual encoding.

* common/t-support.h (no_exit_on_fail, errcount): New.
(fail): Bump errcount.
* common/t-zb32.c (main): Add options to allow manual use.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-10-30 12:40:22 +01:00
parent 5aadb4b62d
commit d89a9fca46
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 214 additions and 12 deletions

View file

@ -69,8 +69,15 @@ void gcry_free (void *a);
#define pass() do { ; } while(0)
#define fail(a) do { fprintf (stderr, "%s:%d: test %d failed\n",\
__FILE__,__LINE__, (a)); \
exit (1); \
errcount++; \
if (!no_exit_on_fail) \
exit (1); \
} while(0)
/* If this flag is set the fail macro does not call exit. */
static int no_exit_on_fail;
/* Error counter. */
static int errcount;
#endif /*GNUPG_COMMON_T_SUPPORT_H*/