From ec717caad1896036af62cab4c30cae5728f3ffcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 15 Jan 2014 23:24:21 +0100 Subject: [PATCH] test: Remove short option and fail on invalid options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonas Ã…dahl --- test/litest.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/litest.c b/test/litest.c index e5898e17..1f063c02 100644 --- a/test/litest.c +++ b/test/litest.c @@ -267,13 +267,17 @@ litest_run(int argc, char **argv) { int c; int option_index = 0; - c = getopt_long(argc, argv, "l", opts, &option_index); + c = getopt_long(argc, argv, "", opts, &option_index); if (c == -1) break; switch(c) { case 'l': litest_list_tests(&all_tests); return 0; + default: + fprintf(stderr, "usage: %s [--list]\n", argv[0]); + return 1; + } }