summaryrefslogtreecommitdiffstats
path: root/bin/test
Commit message (Collapse)AuthorAgeFilesLines
* o Backout rev. 1.40 and rev. 1.49.maxim2002-08-151-36/+34
| | | | | | | | o Add argv[] boudary check. PR: bin/40117 Reviewed by: silence on -audit MFC after: 2 months
* Make test check the tv_nsec part of a struct stat when comparingdwmalone2002-07-271-8/+10
| | | | | | | | | the mtimes of a file. (This is probably only useful if you have vfs.timestamp_precision set to something nonzero). PR: 39163 Submitted by: Hal Burch <hburch@lumeta.com> MFC after: 2 weeks
* Fix a memory leak.maxim2002-07-051-0/+1
| | | | | PR: bin/40177 MFC after: 1 week
* Consistently use FBSDIDobrien2002-06-301-4/+2
|
* while i'm breaking stuff, use __dead2 instead of GCC specific __attribute__.alfred2002-05-111-2/+1
|
* backout additional include of cdefs.h, it's not helping any.alfred2002-05-111-1/+0
|
* include cdefs.h for __printf0like to silence warning.alfred2002-05-111-0/+1
|
* Use intmax_t as quad_t replacement, like in exprache2002-03-281-5/+6
|
* Log:maxim2002-03-061-10/+6
| | | | | | | | | | | Remove eaccess(2) absence workaround. Add eaccess(2) checks for FILRD, FILWR, FILEX and FILEXIST cases. We cannot MFC this because there is no eaccess(2) in -stable yet. PR: bin/35076 Reviewed by: ru Approved by: ru
* __printflike() should really be __printf0like() since verrx() cankris2002-02-041-1/+1
| | | | accept a NULL format string.
* Add a __printflike() attribute to silence warning with FORMAT_AUDIT=1kris2002-02-041-1/+2
|
* Work around a buffer overflow problem on argv that has been exposedknu2002-02-031-6/+16
| | | | | | | | | | | | | | | | | | after making test(1) a sh(1) builtin; sh(1) coredumps when you run something like this: sh -c 'test ! `true 1`' The cause is that the test(1) code totally depends on the presence of two extra cells at the end of argv that are filled with NULL's. The reason why the bug hasn't been exposed would be because the C startup code kindly prepares argv with some extra zeroed cells for a program. I know this is not the best fix, but since there are argv++'s without boundary checks everywhere, I'd rather patch it up like this (preparing a copy of argv with extra NULL's) for the moment. MFC after: 3 days
* o __P has been reovedimp2002-02-021-61/+32
| | | | | | | | | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ...
* strtoq -> strtoll (strtoq is deprecated)ache2001-12-251-5/+5
|
* 1) Localize (LC_CTYPE)ache2001-12-171-0/+11
| | | | | 2) Catch "" to 0 conversion for OSes that not catch it in strto*() (f.e. -stable). It is needed because POSIX agrees with both variants.
* POSIX strto*() functions MAY return EINVAL, so don't assume that only oneache2001-12-141-2/+4
| | | | errno from them allowed and it is always ERANGE
* Default to WARNS=2. Binary builds that cannot handle this must explicitlyobrien2001-12-041-2/+0
| | | | | | set WARNS=0. Reviewed by: mike
* Fix style bugs I found, and add a comment.knu2001-11-191-10/+11
|
* Oops sorry, forgot to add a #include.knu2001-11-191-0/+1
|
* - Do not reference argv[1] if no argument is given.knu2001-11-191-7/+34
| | | | | | Reported by: brian - Call error() instead of errx() if compiled as sh(1) builtin.
* Make test(1) a builtin command of our sh(1) for efficiency. Theknu2001-11-172-0/+13
| | | | | | | | | | | binary size increase is 3,784 bytes (about 0.6%). I don't drop the printf builtin while I'm here because some /etc/rc.* scripts seem to use it before mounting /usr where printf(1) resides. Reviewed by: arch (sheldonh) Inspired by: NetBSD, ksh Clued by: ume (on how the printf builtin is used)
* The file_descriptor argument to -t isn't optional, so don't mark it up so.dd2001-08-311-1/+1
|
* mdoc(7) police:ru2001-08-071-1/+1
| | | | | | | Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text. Not only this slows down the mdoc(7) processing significantly, but it also has an undesired (in this case) effect of disabling hyphenation within the entire enclosed block.
* Remove whitespace at EOL.dd2001-07-151-6/+6
|
* WARNS= -> WARNS?=dd2001-06-221-1/+1
| | | | Submitted by: Mike Barcroft <mike@q9media.com>
* Silence WARNS=2 and BDECFLAGS on alpha and i386kris2001-05-202-15/+19
| | | | MFC After: 1 week
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-6/+6
|
* mdoc(7) police: now that Nm macro accepts punctuation charactersru2000-11-181-1/+1
| | | | | | as argument, unbreak this page by escaping the `[' character. Noticed by: sheldonh
* Add support for 64bit integer comparisons.se2000-07-101-6/+50
|
* Remove test for block device.kris2000-05-071-1/+0
|
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-011-1/+2
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* Take into account the fact that "[" may be called with a path,sheldonh1999-12-281-1/+6
| | | | | | | | for example "/bin/[". Reported by: Vlad Skvortsov <vss@ulstu.ru> Reported by: Peter Jeremy <peter.jeremy@alcatel.com.au> Message-Id: 99Dec27.111307est.40321@border.alcanet.com.au
* $Id$ -> $FreeBSD$peter1999-08-276-6/+6
|
* Make the comments nice, short-but-sweet XXX format.green1999-08-241-10/+3
| | | | Submitted by: sheldonh
* Make a comment I added a bit nicer.green1999-08-221-2/+3
|
* Finally: fix test -x as completely as possible.green1999-08-201-7/+17
| | | | | Reviewed by: bde Reworked by: bde
* The new test(1) did not use access() correctly. I don't know why, sincegreen1999-08-181-2/+7
| | | | | | | | supposedly it's ksh-derived, and it's not broken in pdksh. I've added a test for test running as root: if testing for -x, the file must be mode & 0111 to get "success", rather than just existant. Reviewed by: chris
* Replace our test(1) with NetBSD's pdksh-derived version. The code issheldonh1999-08-165-785/+465
| | | | | | | | | | | | significantly easier to read and extend and offers a few new tests. A few style changes taken from style(9) and OpenBSD, as well as whitespace cleanups. This change was discussed on freebsd-committers and freebsd-hackers and met with approval from at least des, eivind and brian. PR: 13091 Obtained from: NetBSD
* Minor style fix - change 'if(!*v)' to 'if (!*v)'chris1999-08-141-2/+2
|
* Various spelling/formatting changes.kris1999-05-081-2/+2
| | | | Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
* Add cross-references to test(1) and expr(1) respectively.jkoshy1998-12-181-1/+4
| | | | | PR: docs/9111 Submitted by: Josh Gilliam <josh@quick.net>
* Add -S flag to test for sockets.cracauer1998-09-074-17/+28
| | | | | | PR: bin/7507 Reviewed by: I tested the patch Submitted by: Stefan `Sec` Zehl sec@42.org
* Correct use of .Nm. Add rcsid.charnier1998-05-183-13/+17
|
* Remove simultaneous include of <sys/param.h> and <sys/types.h>.eivind1997-12-101-3/+2
| | | | | Reorder includes to be alphabetical some places since I already was in here.
* Typo fix.charnier1997-06-021-2/+3
|
* Revert $FreeBSD$ to $Id$peter1997-02-228-8/+8
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-148-8/+8
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* add some string examples, eg. test "" -o ""wosch1996-12-281-12/+16
|
* Fix handling of -o and -a operators in the 3 argument case.steve1996-12-251-2/+2
| | | | Submitted by: Tom Rush <tarush@mindspring.com>
* -Wall cleaning.steve1996-12-142-5/+5
|
OpenPOWER on IntegriCloud