bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix coreutils-5.0.91 rejecting "[ toto -eq tata ]" like form


From: Thierry Vignaud
Subject: Re: [PATCH] fix coreutils-5.0.91 rejecting "[ toto -eq tata ]" like forms
Date: Wed, 07 Jan 2004 17:35:30 +0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Jim Meyering <address@hidden> writes:

> > latest coreutils wrongly assume the same behavior for both test
> > and [ programs.
> 
> Thanks for the patch, but so far I don't see a problem.
> FYI, the latest is 5.1.0, but that has a couple of known problems.
> 5.1.1 should be out soon.
> 
> > however, whereas it's ok for test to be called as in "test toto
> > -eq tata ]" , "[" call must be finished by a "]" as in "[ toto -eq
> > tata ]"
> 
> Given the above description, I have been unable to guess what a
> failing test case might be.
> 
> > see http://qa.mandrakesoft.com/show_bug.cgi?id=6736 for reference
> 
> I can't reproduce the failure mentioned in the above URL.
> Please provide a precise test case: what you typed, what was output,
> and what you expected.  And be sure to use an unmodified version of
> the coreutils package.  E.g., compile from source, then do something
> like this:

#
# coreutils-5.0:
#

$ rpm -q coreutils
coreutils-5.0-6mdk
$ [ --version|head -n1
$ [ x = x ] && echo ok
ok
$ [ x = x
[: missing `]'
$ test 1 -eq 2
$ test 1 -eq 2 ]
test: too many arguments
$ perl -e 'system("[", "1", "=", "1", "]")'
$ perl -e 'system("/usr/bin/[", "1", "=", "1", "]")'
/usr/bin/[: too many arguments
$ perl -e 'system("/usr/bin/[", "1", "=", "1")'



#
# unpatched coreutils-5.0.91:
#

$ rpm -q coreutils
coreutils-5.0.91-4mdk
$ [ --version|head -n1
$ [ x = x ] && echo ok
[: too many arguments
$ [ x = x
$ test 1 -eq 2
$ test 1 -eq 2 ]
test: too many arguments
$ perl -e 'system("[", "1", "=", "1", "]")'
[: too many arguments
$ perl -e 'system("/usr/bin/[", "1", "=", "1", "]")'
/usr/bin/[: too many arguments
$ perl -e 'system("/usr/bin/[", "1", "=", "1")'




#
# patched coreutils-5.0.91:
#

$ rpm -q coreutils
coreutils-5.0.91-5mdk
$ [ --version|head -n1
test (GNU coreutils) 5.0.91
$ [ x = x ] && echo ok
ok
$ [ x = x
[: missing `]'
$ test 1 -eq 2
$ test 1 -eq 2 ]
test: too many arguments
$ perl -e 'system("[", "1", "=", "1", "]")'
$ perl -e 'system("/usr/bin/[", "1", "=", "1", "]")'
$ perl -e 'system("/usr/bin/[", "1", "=", "1")'
/usr/bin/[: missing `]'





reply via email to

[Prev in Thread] Current Thread [Next in Thread]