Problem with test(1)

Tom Evans tevans.uk at googlemail.com
Thu Apr 5 09:35:54 UTC 2007


On Thu, 2007-04-05 at 03:12 -0400, Joe Marcus Clarke wrote:
> I noticed something weird with test(1) when I ran across a problem port
> Makefile.  Our test(1) doesn't properly check to make sure there is an
> operand argument to unary operators like -f.  For example:
> 
> test -f
> 
> Will print "TRUE" on FreeBSD.  On Solaris, it will die:
> 
> /usr/bin/test[8]: test: argument expected
> 
> I think this patch is correct in that it does fix the problem, and the
> TEST.sh and TEST.csh regression scripts report the same results pre and
> post-patch.  Comments?
> 
> http://www.marcuscom.com/downloads/text.c.diff
> 
> Joe
> 

He means http://www.marcuscom.com/downloads/test.c.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070405/dfa27e12/attachment.pgp


More information about the freebsd-hackers mailing list