9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* mistakes in test(1)
@ 1996-02-07  9:21 Dave
  0 siblings, 0 replies; 3+ messages in thread
From: Dave @ 1996-02-07  9:21 UTC (permalink / raw)


right you are.  I fixed the CHDIR arbitrarily differently.
Boddle is http://plan9.att.com/plan9/update/cmd/test.rc

------ forwarded message follows ------

>From cse.psu.edu!9fans-outgoing-owner Wed Feb  7 10:17:09 EST 1996
Received: from colossus.cse.psu.edu by plan9; Wed Feb  7 10:17:09 EST 1996
Received: by colossus.cse.psu.edu id <78354>; Wed, 7 Feb 1996 09:56:25 -0500
Received: from hamnavoe.demon.co.uk ([158.152.225.204]) by colossus.cse.psu.edu with SMTP id <78352>; Wed, 7 Feb 1996 09:55:54 -0500
From:	hamnavoe.demon.co.uk!miller
To:	cse.psu.edu!9fans
Date:	Wed, 7 Feb 1996 07:21:15 -0500
Subject: mistakes in test(1)
Message-Id: <96Feb7.095554est.78352@colossus.cse.psu.edu>
Sender: cse.psu.edu!owner-9fans
Precedence: bulk
Reply-To: cse.psu.edu!9fans

I think there are two errors in the implementation of the test command,
as shown by the following examples:

	if (test -d . -a ! -f .) echo OK
	if (test ! ! -d .) echo OK

A suggested correction:

diff /sys/src/cmd/test.c test.c

86c86
<               return(!e3());
---
>               return(!e2());
193c193
<       return(dir.mode&CHDIR);
---
>       return((dir.mode&CHDIR)!=0);

--
Richard Miller <miller@hamnavoe.demon.co.uk>
18 Lathbury Road, Oxford OX2 7AU, England







^ permalink raw reply	[flat|nested] 3+ messages in thread

* mistakes in test(1)
@ 1996-02-07 17:26 dhog
  0 siblings, 0 replies; 3+ messages in thread
From: dhog @ 1996-02-07 17:26 UTC (permalink / raw)


>Boddle is http://plan9.att.com/plan9/update/cmd/test.rc

I think you left a debug print in...






^ permalink raw reply	[flat|nested] 3+ messages in thread

* mistakes in test(1)
@ 1996-02-07 12:21 miller
  0 siblings, 0 replies; 3+ messages in thread
From: miller @ 1996-02-07 12:21 UTC (permalink / raw)


I think there are two errors in the implementation of the test command,
as shown by the following examples:

	if (test -d . -a ! -f .) echo OK
	if (test ! ! -d .) echo OK

A suggested correction:

diff /sys/src/cmd/test.c test.c

86c86
<               return(!e3());
---
>               return(!e2());
193c193
<       return(dir.mode&CHDIR);
---
>       return((dir.mode&CHDIR)!=0);

--
Richard Miller <miller@hamnavoe.demon.co.uk>
18 Lathbury Road, Oxford OX2 7AU, England






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-02-07 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-02-07  9:21 mistakes in test(1) Dave
1996-02-07 12:21 miller
1996-02-07 17:26 dhog

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).