Message ID | 20111017184912.4729.26525.launchpad@ackee.canonical.com |
---|---|
State | Accepted |
Headers | show |
=== modified file 'test/options.cc' --- test/options.cc 2011-06-22 23:11:46 +0000 +++ test/options.cc 2011-10-17 18:46:36 +0000 @@ -32,6 +32,15 @@ int c = getopt_long(argc, argv, "", long_options, &option_index); while (c != -1) { + // getopt_long() returns '?' and prints an "unrecognized option" error + // to stderr if it does not recognize an option. Just trigger + // the help/usage message, stop processing and get out. + if (c == '?') + { + show_help_ = true; + break; + } + std::string optname(long_options[option_index].name); if (optname == verbose_name_)