/* Test suite for argp.
- Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
#include <stdio.h>
#include <stdlib.h>
-#if HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#define INIT_TEST_COMMON(n) \
int argc = NARGS (argv); \
struct test_args test_args; \
- init_args(test_args); \
+ init_args (test_args); \
test_number = n;
#define INIT_TEST1(n, arg1) \
char *argv[] = { ARGV0, arg1, NULL }; \
- INIT_TEST_COMMON(n)
+ INIT_TEST_COMMON (n)
#define INIT_TEST2(n, arg1, arg2) \
char *argv[] = { ARGV0, arg1, arg2, NULL }; \
- INIT_TEST_COMMON(n)
+ INIT_TEST_COMMON (n)
#define INIT_TEST3(n, arg1, arg2, arg3) \
char *argv[] = { ARGV0, arg1, arg2, arg3, NULL }; \
- INIT_TEST_COMMON(n)
+ INIT_TEST_COMMON (n)
int test_number;
unsigned failure_count = 0;
void
test_optional (struct argp *argp, int argc, char **argv,
- struct test_args *args, char *val, char *a)
+ struct test_args *args, const char *val, const char *a)
{
int index;
if (argp_parse (argp, argc, argv, 0, &index, args))