-#ifdef TEST_CMDLINE
- TestCmdLineConvert();
-
-#if wxUSE_CMDLINE_PARSER
- static const wxCmdLineEntryDesc cmdLineDesc[] =
- {
- { wxCMD_LINE_SWITCH, "h", "help", "show this help message",
- wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
- { wxCMD_LINE_SWITCH, "v", "verbose", "be verbose" },
- { wxCMD_LINE_SWITCH, "q", "quiet", "be quiet" },
-
- { wxCMD_LINE_OPTION, "o", "output", "output file" },
- { wxCMD_LINE_OPTION, "i", "input", "input dir" },
- { wxCMD_LINE_OPTION, "s", "size", "output block size",
- wxCMD_LINE_VAL_NUMBER },
- { wxCMD_LINE_OPTION, "d", "date", "output file date",
- wxCMD_LINE_VAL_DATE },
- { wxCMD_LINE_OPTION, "f", "double", "output double",
- wxCMD_LINE_VAL_DOUBLE },
-
- { wxCMD_LINE_PARAM, NULL, NULL, "input file",
- wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE },
-
- { wxCMD_LINE_NONE }
- };
-
- wxCmdLineParser parser(cmdLineDesc, argc, wxArgv);
-
- parser.AddOption(wxT("project_name"), wxT(""), wxT("full path to project file"),
- wxCMD_LINE_VAL_STRING,
- wxCMD_LINE_OPTION_MANDATORY | wxCMD_LINE_NEEDS_SEPARATOR);
-
- switch ( parser.Parse() )
- {
- case -1:
- wxLogMessage(wxT("Help was given, terminating."));
- break;
-
- case 0:
- ShowCmdLine(parser);
- break;
-
- default:
- wxLogMessage(wxT("Syntax error detected, aborting."));
- break;
- }
-#endif // wxUSE_CMDLINE_PARSER
-
-#endif // TEST_CMDLINE
-