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