* @brief tests for program.c
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_time_lib.h"
+#include "gnunet_util_lib.h"
static int setme1, setme2;
*/
static void
-runner (void *cls,
- char *const *args,
- const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
+runner (void *cls, char *const *args, const char *cfgfile,
+ const struct GNUNET_CONFIGURATION_Handle *cfg)
{
int *ok = cls;
+
GNUNET_assert (setme1 == 1);
GNUNET_assert (0 == strcmp (args[0], "extra"));
GNUNET_assert (args[1] == NULL);
check ()
{
int ok = 1;
+
char *const argv[] = {
"test_program",
"-c",
};
GNUNET_assert (GNUNET_OK ==
- GNUNET_PROGRAM_run (7,
- argv,
- "test_program",
- "A test", options1, &runner, &ok));
+ GNUNET_PROGRAM_run (7, argv, "test_program", "A test",
+ options1, &runner, &ok));
GNUNET_assert (GNUNET_OK ==
- GNUNET_PROGRAM_run (7,
- argv,
- "test_program",
- "A test", options2, &runner, &ok));
+ GNUNET_PROGRAM_run (7, argv, "test_program", "A test",
+ options2, &runner, &ok));
GNUNET_assert (GNUNET_OK ==
- GNUNET_PROGRAM_run (7,
- argv,
- "test_program",
- "A test", options3, &runner, &ok));
+ GNUNET_PROGRAM_run (7, argv, "test_program", "A test",
+ options3, &runner, &ok));
GNUNET_assert (GNUNET_OK ==
- GNUNET_PROGRAM_run (7,
- argv,
- "test_program",
- "A test", options4, &runner, &ok));
+ GNUNET_PROGRAM_run (7, argv, "test_program", "A test",
+ options4, &runner, &ok));
return ok;
}