aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_getopt.c
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2013-07-22 08:26:16 -0500
committerDavid Barksdale <amatus.amongus@gmail.com>2013-07-22 08:26:16 -0500
commit7450bd0b6c6c05ee6425e2c63e9b79beb94bfbfa (patch)
treedfde89b41437def7ce23af24db53a11a9b5f1075 /src/util/test_getopt.c
parent740b30688bd745a527f96f9116c19acb3480971a (diff)
Imported Upstream version 0.9.5aupstream
Diffstat (limited to 'src/util/test_getopt.c')
-rw-r--r--src/util/test_getopt.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/util/test_getopt.c b/src/util/test_getopt.c
index a517887..313167d 100644
--- a/src/util/test_getopt.c
+++ b/src/util/test_getopt.c
@@ -26,7 +26,6 @@
#include "gnunet_configuration_lib.h"
#include "gnunet_getopt_lib.h"
-#define VERBOSE 0
static int
testMinimal ()
@@ -45,6 +44,7 @@ testMinimal ()
return 0;
}
+
static int
testVerbose ()
{
@@ -75,6 +75,7 @@ testVerbose ()
return 0;
}
+
static int
testVersion ()
{
@@ -84,11 +85,11 @@ testVersion ()
NULL
};
const struct GNUNET_GETOPT_CommandLineOption versionoptionlist[] = {
- GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION),
+ GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION),
GNUNET_GETOPT_OPTION_END
};
- if (-1 != GNUNET_GETOPT_run ("test_getopt", versionoptionlist, 2, myargv))
+ if (0 != GNUNET_GETOPT_run ("test_getopt", versionoptionlist, 2, myargv))
{
GNUNET_break (0);
return 1;
@@ -96,6 +97,7 @@ testVersion ()
return 0;
}
+
static int
testAbout ()
{
@@ -109,7 +111,7 @@ testAbout ()
GNUNET_GETOPT_OPTION_END
};
- if (-1 != GNUNET_GETOPT_run ("test_getopt", aboutoptionlist, 2, myargv))
+ if (0 != GNUNET_GETOPT_run ("test_getopt", aboutoptionlist, 2, myargv))
{
GNUNET_break (0);
return 1;
@@ -117,6 +119,7 @@ testAbout ()
return 0;
}
+
static int
testLogOpts ()
{
@@ -153,6 +156,7 @@ testLogOpts ()
return 0;
}
+
static int
testFlagNum ()
{
@@ -190,6 +194,7 @@ testFlagNum ()
return 0;
}
+
int
main (int argc, char *argv[])
{