projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strtoumax: fix another typo in previous commit
[gnulib.git]
/
tests
/
test-argp.c
diff --git
a/tests/test-argp.c
b/tests/test-argp.c
index
85de5f4
..
a96dee8
100644
(file)
--- a/
tests/test-argp.c
+++ b/
tests/test-argp.c
@@
-1,5
+1,5
@@
/* Test suite for argp.
/* Test suite for argp.
- Copyright (C) 2006-2007, 2009-201
0
Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-201
3
Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
@@
-21,9
+21,7
@@
#include <stdio.h>
#include <stdlib.h>
#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
#if HAVE_STRINGS_H
# include <strings.h>
#endif
@@
-228,7
+226,7
@@
parse_opt (int key, char *arg, struct argp_state *state)
{
case ARGP_KEY_INIT:
for (i = 0; state->root_argp->children[i].argp; i++)
{
case ARGP_KEY_INIT:
for (i = 0; state->root_argp->children[i].argp; i++)
- state->child_inputs[i] = args;
+
state->child_inputs[i] = args;
break;
case 't':
break;
case 't':
@@
-348,7
+346,7
@@
test6 (struct argp *argp)
void
test_optional (struct argp *argp, int argc, char **argv,
void
test_optional (struct argp *argp, int argc, char **argv,
- struct test_args *args, const char *val, const char *a)
+
struct test_args *args, const char *val, const char *a)
{
int index;
if (argp_parse (argp, argc, argv, 0, &index, args))
{
int index;
if (argp_parse (argp, argc, argv, 0, &index, args))
@@
-359,7
+357,7
@@
test_optional (struct argp *argp, int argc, char **argv,
if (!val)
{
if (args->optional)
if (!val)
{
if (args->optional)
- fail ("option processed incorrectly");
+
fail ("option processed incorrectly");
}
else if (strcmp (args->optional, val))
fail ("option processed incorrectly");
}
else if (strcmp (args->optional, val))
fail ("option processed incorrectly");
@@
-367,9
+365,9
@@
test_optional (struct argp *argp, int argc, char **argv,
if (a)
{
if (index == argc)
if (a)
{
if (index == argc)
- fail ("expected command line argument not found");
+
fail ("expected command line argument not found");
else if (strcmp (argv[index], a))
else if (strcmp (argv[index], a))
- fail ("expected command line argument does not match");
+
fail ("expected command line argument does not match");
}
}
}
}