diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-03-06 20:07:37 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-03-06 20:07:37 -0500 |
commit | bef3a2e28bdef09022c0baa6263a4839acc1091a (patch) | |
tree | b56b4ebd6d8df74d598241aa062dd6e0fa191670 | |
parent | b40d6490c4155a466d97561950fa9c3aa142170d (diff) |
add list of tests to usage output
-rw-r--r-- | main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -68,9 +68,20 @@ static struct { { "wctype", test_wctype_h, 1 }, }; +void show_tests(void) +{ + size_t i; + printf("Valid tests: %s", tests[0].name); + for (i = 1; i < sizeof(tests) / sizeof(tests[0]); i++) { + printf(", %s", tests[i].name); + } + printf("\n"); +} + void usage(const char *argv0) { printf("Usage: %s [-v] [test...]\n", argv0); + show_tests(); } int main(int argc, char *argv[]) |