Improve tesing of command line apps
[awesomized/libmemcached] / clients / memcat.cc
index 3e073650345750b35b3325855f1b4fe63af77fca..ab482e5d6ad57549b17f06d0352b3b132562f1b4 100644 (file)
@@ -192,6 +192,7 @@ void options_parse(int argc, char *argv[])
     {
       {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION},
       {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP},
+      {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET},
       {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE},
       {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG},
       {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS},
@@ -242,6 +243,11 @@ void options_parse(int argc, char *argv[])
     case OPT_FILE:
       opt_file= optarg;
       break;
+
+    case OPT_QUIET:
+      close_stdio();
+      break;
+
     case '?':
       /* getopt_long already printed an error message. */
       exit(1);