Rev 3424 | Rev 3536 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3424 | Rev 3425 | ||
|---|---|---|---|
| Line 106... | Line 106... | ||
| 106 | printf("%c\t%s\t\t%s%s\n", c, test->name, test->desc, (test->safe ? "" : " (unsafe)")); |
106 | printf("%c\t%s\t\t%s%s\n", c, test->name, test->desc, (test->safe ? "" : " (unsafe)")); |
| 107 | 107 | ||
| 108 | printf("*\t\t\tRun all safe tests\n"); |
108 | printf("*\t\t\tRun all safe tests\n"); |
| 109 | } |
109 | } |
| 110 | 110 | ||
| 111 | int main(void) |
111 | int main(int argc, char **argv) |
| 112 | { |
112 | { |
| - | 113 | printf("Number of arguments: %d\n", argc); |
|
| - | 114 | if (argv) { |
|
| - | 115 | printf("Arguments:"); |
|
| - | 116 | while (*argv) { |
|
| - | 117 | printf(" '%s'", *argv++); |
|
| - | 118 | } |
|
| - | 119 | printf("\n"); |
|
| - | 120 | } |
|
| - | 121 | ||
| 113 | while (1) { |
122 | while (1) { |
| 114 | char c; |
123 | char c; |
| 115 | test_t *test; |
124 | test_t *test; |
| 116 | 125 | ||
| 117 | list_tests(); |
126 | list_tests(); |
| Line 123... | Line 132... | ||
| 123 | if ((c >= 'a') && (c <= 'z')) { |
132 | if ((c >= 'a') && (c <= 'z')) { |
| 124 | for (test = tests; test->name != NULL; test++, c--) |
133 | for (test = tests; test->name != NULL; test++, c--) |
| 125 | if (c == 'a') |
134 | if (c == 'a') |
| 126 | break; |
135 | break; |
| 127 | 136 | ||
| 128 | if (c > 'a') |
137 | if (test->name == NULL) |
| 129 | printf("Unknown test\n\n"); |
138 | printf("Unknown test\n\n"); |
| 130 | else |
139 | else |
| 131 | run_test(test); |
140 | run_test(test); |
| 132 | } else if (c == '*') { |
141 | } else if (c == '*') { |
| 133 | run_safe_tests(); |
142 | run_safe_tests(); |