51 static int m_automatic = 0;
52 static int m_basic = 0;
53 static int m_console = 0;
54 static int m_list = 0;
55 static int m_curses= 0;
56 static char* m_filename = NULL;
71 static void TestHelp(
void)
73 static const char* lines[] = {
74 "The following switches are available:",
76 " -a Automatic - run tests in automatic mode. If the -f switch is also",
77 " given, the output is set to a file whose root name is given here.",
78 " Two files are produced, <root>-Listing.xml, listing the tests,",
79 " and <root>-Results.xml listing the contents of the tests. If not",
80 " specified, a default name (CUnitAutomated) is used instead.",
81 " -b Basic - run tests in basic mode. (This is the default.)",
82 " -c Console - run tests using console mode.",
83 " -f file Name of the file for automatic or list mode.",
84 " -h Print this message and exit.",
85 " -l List tests to file.",
86 " -u Curses - run tests using curses interface.",
88 " (The options 'a', 'b', 'c', 'l' and 'u' are mutually exclusive.)",
93 for (i = 0; lines[i]; ++i) {
94 printf(
"%s\n", lines[i]);
113 static void TestCommandLine(
int argc,
char** argv)
120 while ((c = getopt(argc, argv,
"abcf:hlu")) != -1) {
151 fprintf(stderr,
"Unrecognised switch: -%c\n", optopt);
176 TestCommandLine(argc, argv);
186 printf(
"Conflicting options given\n\n");
int TestGetAutomatic(void)
void TestInitialize(int argc, char **argv)
const char * TestGetFilename(void)