Date: Fri, 5 Jul 1996 19:10:04 +0200 From: Wolfram Schneider <wosch@cs.tu-berlin.de> To: Toshihiro Kanda <candy@fct.kgc.co.jp> Cc: freebsd-hackers@FreeBSD.org Subject: test(1) -h behavior (bug??) Message-ID: <199607051710.TAA00676@campa.panke.de> In-Reply-To: <199607050547.OAA15001@xxx.fct.kgc.co.jp> References: <199607050547.OAA15001@xxx.fct.kgc.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Already fixed. test.c revision 1.12 date: 1995/10/28 11:54:42; author: ache; state: Exp; lines: +2 -2 Fix -h option: sense symlink even it is unresolved Toshihiro Kanda writes: > If a symbolic link file ``foo'' points non-existence file, should >``/bin/test foo'' return 0 or 1? > > In FreeBSD 2.1R, /bin/test returns 1. While built-in command `test' >of `GNU bash, version 1.14.2(1)' returns 0. > > bash$ ln -s nofile foo > bash$ /bin/test -h foo ; echo $? > 1 > bash$ test -h foo ; echo $? > 0 > > I've tested `SunOS 4.1.3_U1 sun4c', `NetBSD 1.1 sparc' and `IRIX64 >6.2 IP19'. Then all these /bin/test returned 0. > >candy@fct.kgc.co.jp (Toshihiro Kanda)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607051710.TAA00676>