-fix time assertion introduce in last patch
[oweals/gnunet.git] / src / util / test_getopt.c
index a517887bff54c9e6a1c56c8c688a37a79ddaa9b3..9e56bc843d30d21636b8076e143b65e0c32b4dcc 100644 (file)
  * @brief testcase for util/getopt.c
  */
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_configuration_lib.h"
-#include "gnunet_getopt_lib.h"
+#include "gnunet_util_lib.h"
 
-#define VERBOSE 0
 
 static int
 testMinimal ()
@@ -45,6 +42,7 @@ testMinimal ()
   return 0;
 }
 
+
 static int
 testVerbose ()
 {
@@ -75,6 +73,7 @@ testVerbose ()
   return 0;
 }
 
+
 static int
 testVersion ()
 {
@@ -84,11 +83,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 +95,7 @@ testVersion ()
   return 0;
 }
 
+
 static int
 testAbout ()
 {
@@ -109,7 +109,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 +117,7 @@ testAbout ()
   return 0;
 }
 
+
 static int
 testLogOpts ()
 {
@@ -153,6 +154,7 @@ testLogOpts ()
   return 0;
 }
 
+
 static int
 testFlagNum ()
 {
@@ -190,6 +192,7 @@ testFlagNum ()
   return 0;
 }
 
+
 int
 main (int argc, char *argv[])
 {