9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dave Presotto presotto@plan9.att.com
Subject: mistakes in test(1)
Date: Wed,  7 Feb 1996 04:21:26 -0500	[thread overview]
Message-ID: <19960207092126.Q8iRnDq1DbwcjzFkORXdsKWmFYencfrjnirOLQOd7t4@z> (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







             reply	other threads:[~1996-02-07  9:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-07  9:21 Dave [this message]
1996-02-07 12:21 miller
1996-02-07 17:26 dhog

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19960207092126.Q8iRnDq1DbwcjzFkORXdsKWmFYencfrjnirOLQOd7t4@z \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).