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:
parent
5aadb4b62d
commit
d89a9fca46
3 changed files with 214 additions and 12 deletions
|
@ -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*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue