diff options
Diffstat (limited to 'test/color_content.c')
| -rw-r--r-- | test/color_content.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/test/color_content.c b/test/color_content.c index d08dffb09fb5..0e496ac1e9bb 100644 --- a/test/color_content.c +++ b/test/color_content.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2022,2023 Thomas E. Dickey * + * Copyright 2018-2024,2025 Thomas E. Dickey * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: color_content.c,v 1.19 2023/02/25 16:48:02 tom Exp $ + * $Id: color_content.c,v 1.23 2025/07/05 15:21:56 tom Exp $ */ #define NEED_TIME_H @@ -186,7 +186,7 @@ run_test(void) my_color_t g; my_color_t b; if (ColorContent(color, &r, &g, &b) == OK) { - if (expected != 0) { + if (expected != NULL) { if (r != expected[color].r) success = FALSE; if (g != expected[color].g) @@ -220,10 +220,10 @@ usage(int ok) ,"Options:" ," -f COLOR first color value to test (default: 0)" ," -i interactive, showing test-progress" - ," -l COLOR last color value to test (default: max_colors-1)" + ," -F COLOR last color value to test (default: max_colors-1)" ," -n do not initialize color pairs" ," -p print data for color content instead of testing" - ," -r COUNT repeat for given count" + ," -r NUM repeat tests NUM times" ," -s initialize pairs sequentially rather than random" #if USE_EXTENDED_COLOR ," -x use extended color pairs/values" @@ -243,7 +243,7 @@ main(int argc, char *argv[]) { int ch; - while ((ch = getopt(argc, argv, OPTS_COMMON "f:il:npr:sx")) != -1) { + while ((ch = getopt(argc, argv, OPTS_COMMON "f:iF:npr:sx")) != -1) { switch (ch) { case 'f': if ((f_opt = atoi(optarg)) <= 0) @@ -252,7 +252,7 @@ main(int argc, char *argv[]) case 'i': i_opt = 1; break; - case 'l': + case 'F': if ((l_opt = atoi(optarg)) <= 0) usage(FALSE); break; @@ -274,11 +274,8 @@ main(int argc, char *argv[]) x_opt = 1; break; #endif - case OPTS_VERSION: - show_version(argv); - ExitProgram(EXIT_SUCCESS); default: - usage(ch == OPTS_USAGE); + CASE_COMMON; /* NOTREACHED */ } } |
