diff options
author | Jim Meyering <jim@meyering.net> | 1993-10-12 01:52:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-10-12 01:52:24 +0000 |
commit | 87fa23e6417d7d1938b72e872d779ae7225a5aa4 (patch) | |
tree | 0fcc68f9cdf7315d09d5836df0f261e3d6b8c13a /src/test.c | |
parent | f12b53b2ce8f0bb0dd28a290f9b27490ef4599a9 (diff) | |
download | coreutils-87fa23e6417d7d1938b72e872d779ae7225a5aa4.tar.xz |
merge with 1.8.1b
Diffstat (limited to 'src/test.c')
-rw-r--r-- | src/test.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test.c b/src/test.c index b2cb92d22..d905c63e6 100644 --- a/src/test.c +++ b/src/test.c @@ -993,6 +993,18 @@ posixtest () return (value); } +#if defined (TEST_STANDALONE) +void parse_long_options (); + +static void +usage () +{ + fprintf (stderr, "Usage: %s [{--help,--version}] [expr]\n", + program_name); + exit (1); +} +#endif /* TEST_STANDALONE */ + /* * [: * '[' expr ']' @@ -1026,6 +1038,8 @@ test_command (margc, margv) if (margv[0] && strcmp (margv[0], "[") == 0) { + parse_long_options (margc, margv, usage); + --margc; if (margc < 2) @@ -1041,6 +1055,7 @@ test_command (margc, margv) if (pos >= argc) test_exit (SHELL_BOOLEAN (FALSE)); + parse_long_options (argc, argv, usage); value = posixtest (); if (pos != argc) |