Jasen Betts wrote: > This is a bug report against the man page documebntation for "test"
Thank you for your report. However I think you are mistaken. > The man page for /usr/bin/test lists --help and --version as command-line > options. Not quite. The man page for test is combined with the man page for [. Only [ lists any available option. The test synopsis does not list any options for test. SYNOPSIS test EXPRESSION test [ EXPRESSION ] [ ] [ OPTION The 'test' command does not list any options. The [ command lists the potential for one option. > As documented this conflics with the > > test "string" Note that test must parse arguments based upon the number of arguments given. The above has one argument and therefore the behavior is required to be true if $1 is not null otherwise false. > usage ( eg; if "string" was "--help" ) If "string" is "--help" then it is one argument and being non-null test will exit 0 true. > fortunately the man page appears to be in error and --help and > --version are treated as strings to be tested and produce no display > output. The man page does not list any options available for test. The man page only lists options for [. > the info page does not list --help or --version. The info page specifically mentions both --help and --version. test EXPRESSION ... If EXPRESSION is omitted, `test' returns false. If EXPRESSION is a single argument, `test' returns false if the argument is null and true otherwise. The argument can be any string, including strings like `-d', `-1', `--', `--help', and `--version' that most other programs ^^^^^^ ^^^^^^^^^ would treat as options. To get help and version information, invoke the commands `[ --help' and `[ --version', without the usual closing brackets. *Note Common options::. With the above information I think you will agree that the bug can be closed. Bob
signature.asc
Description: Digital signature