mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-30 11:01:45 +08:00
* doc/autoconf.texi (Limitations of Builtins): More details on
`test -n ='.
This commit is contained in:
parent
7435a2e96c
commit
9272d4ee9b
@ -1,3 +1,8 @@
|
||||
2000-05-23 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* doc/autoconf.texi (Limitations of Builtins): More details on
|
||||
`test -n ='.
|
||||
|
||||
2000-05-23 Akim Demaille <akim@epita.fr>
|
||||
|
||||
Simplify the interface: users shouldn't need to explicitly check
|
||||
|
@ -4768,14 +4768,14 @@ start with a dash, since @code{test} might interpret its argument as an
|
||||
option (e.g., @samp{@var{string} = "-n"}).
|
||||
|
||||
Contrary to a common belief, @samp{test -n @var{string}} and @samp{test
|
||||
-z @var{string}} @strong{are} portable, nevertheless many shells (e.g.,
|
||||
FIXME: AIX IIRC) have bizarre precedence and may be confused if
|
||||
@var{string} looks like an operator:
|
||||
-z @var{string}} @strong{are} portable, nevertheless many shells (such
|
||||
as Solaris 2.5, AIX 3.2, UNICOS 10.0.0.6, Digital Unix 4 etc.) have
|
||||
bizarre precedence and may be confused if @var{string} looks like an
|
||||
operator:
|
||||
|
||||
@example
|
||||
@c FIXME: Hm, IIRC:
|
||||
$ test -n "="
|
||||
error: missing argument
|
||||
$ test -n =
|
||||
test: argument expected
|
||||
@end example
|
||||
|
||||
If there are risks, use @samp{test "x@var{string}" = x} or @samp{test
|
||||
|
Loading…
Reference in New Issue
Block a user