Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/test Correct usage for parentheses, and mark up "express...
details: https://anonhg.NetBSD.org/src/rev/7b93cb50b341
branches: trunk
changeset: 748921:7b93cb50b341
user: wiz <wiz%NetBSD.org@localhost>
date: Tue Nov 10 18:19:46 2009 +0000
description:
Correct usage for parentheses, and mark up "expression" in more places.
>From Bug Hunting in PR 42286.
diffstat:
bin/test/test.1 | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
diffs (74 lines):
diff -r 2adc74800503 -r 7b93cb50b341 bin/test/test.1
--- a/bin/test/test.1 Tue Nov 10 17:37:15 2009 +0000
+++ b/bin/test/test.1 Tue Nov 10 18:19:46 2009 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: test.1,v 1.26 2009/05/06 08:26:43 wiz Exp $
+.\" $NetBSD: test.1,v 1.27 2009/11/10 18:19:46 wiz Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -32,7 +32,7 @@
.\"
.\" @(#)test.1 8.1 (Berkeley) 5/31/93
.\"
-.Dd May 5, 2009
+.Dd November 10, 2009
.Dt TEST 1
.Os
.Sh NAME
@@ -47,17 +47,24 @@
.Sh DESCRIPTION
The
.Nm test
-utility evaluates the expression and, if it evaluates
+utility evaluates
+.Ar expression
+and, if it evaluates
to true, returns a zero (true) exit status; otherwise
it returns 1 (false).
-If there is no expression, test also
+If
+.Ar expression
+is not given,
+.Nm test
+also
returns 1 (false).
.Pp
All operators and flags are separate arguments to the
.Nm test
utility.
.Pp
-The following primaries are used to construct expression:
+The following primaries are used to construct
+.Ar expression :
.Bl -tag -width Ar
.It Fl b Ar file
True if
@@ -269,8 +276,10 @@
or
.Ar expression2
are true.
-.It Cm \&( Ns Ar expression Ns Cm \&)
-True if expression is true.
+.It Cm \&( Ar expression Cm \&)
+True if
+.Ar expression
+is true.
.El
.Pp
The
@@ -300,10 +309,11 @@
utility exits with one of the following values:
.Bl -tag -width Ds
.It 0
-expression evaluated to true.
+.Ar expression
+evaluated to true.
.It 1
-expression evaluated to false or expression was
-missing.
+.Ar expression
+evaluated to false or was missing.
.It \*[Gt]1
An error occurred.
.El
Home |
Main Index |
Thread Index |
Old Index