summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-03-06 20:07:37 -0500
committerJakob Kaivo <jkk@ung.org>2019-03-06 20:07:37 -0500
commitbef3a2e28bdef09022c0baa6263a4839acc1091a (patch)
treeb56b4ebd6d8df74d598241aa062dd6e0fa191670
parentb40d6490c4155a466d97561950fa9c3aa142170d (diff)
add list of tests to usage output
-rw-r--r--main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.c b/main.c
index bca639f..9dd5b35 100644
--- a/main.c
+++ b/main.c
@@ -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[])