test.c (218724) | test.c (219084) |
---|---|
1/* $NetBSD: test.c,v 1.21 1999/04/05 09:48:38 kleink Exp $ */ 2 3/*- 4 * test(1); version 7-like -- author Erik Baalbergen 5 * modified by Eric Gisin to be used as built-in. 6 * modified by Arnold Robbins to add SVR3 compatibility 7 * (-x -c -b -p -u -g -k) plus Korn's -L -nt -ot -ef and new -S (socket). 8 * modified by J.T. Conklin for NetBSD. 9 * 10 * This program is in the Public Domain. 11 */ 12/* 13 * Important: This file is used both as a standalone program /bin/test and 14 * as a builtin for /bin/sh (#define SHELL). 15 */ 16 17#include <sys/cdefs.h> | 1/* $NetBSD: test.c,v 1.21 1999/04/05 09:48:38 kleink Exp $ */ 2 3/*- 4 * test(1); version 7-like -- author Erik Baalbergen 5 * modified by Eric Gisin to be used as built-in. 6 * modified by Arnold Robbins to add SVR3 compatibility 7 * (-x -c -b -p -u -g -k) plus Korn's -L -nt -ot -ef and new -S (socket). 8 * modified by J.T. Conklin for NetBSD. 9 * 10 * This program is in the Public Domain. 11 */ 12/* 13 * Important: This file is used both as a standalone program /bin/test and 14 * as a builtin for /bin/sh (#define SHELL). 15 */ 16 17#include <sys/cdefs.h> |
18__FBSDID("$FreeBSD: head/bin/test/test.c 218724 2011-02-15 22:17:47Z jilles $"); | 18__FBSDID("$FreeBSD: head/bin/test/test.c 219084 2011-02-27 12:28:06Z delphij $"); |
19 20#include <sys/types.h> 21#include <sys/stat.h> 22 23#include <ctype.h> 24#include <err.h> 25#include <errno.h> 26#include <inttypes.h> --- 112 unchanged lines hidden (view full) --- 139 {"-z", STREZ, UNOP}, 140 {"-n", STRNZ, UNOP}, 141 {"-h", FILSYM, UNOP}, /* for backwards compat */ 142 {"-O", FILUID, UNOP}, 143 {"-G", FILGID, UNOP}, 144 {"-L", FILSYM, UNOP}, 145 {"-S", FILSOCK,UNOP}, 146 {"=", STREQ, BINOP}, | 19 20#include <sys/types.h> 21#include <sys/stat.h> 22 23#include <ctype.h> 24#include <err.h> 25#include <errno.h> 26#include <inttypes.h> --- 112 unchanged lines hidden (view full) --- 139 {"-z", STREZ, UNOP}, 140 {"-n", STRNZ, UNOP}, 141 {"-h", FILSYM, UNOP}, /* for backwards compat */ 142 {"-O", FILUID, UNOP}, 143 {"-G", FILGID, UNOP}, 144 {"-L", FILSYM, UNOP}, 145 {"-S", FILSOCK,UNOP}, 146 {"=", STREQ, BINOP}, |
147 {"==", STREQ, BINOP}, |
|
147 {"!=", STRNE, BINOP}, 148 {"<", STRLT, BINOP}, 149 {">", STRGT, BINOP}, 150 {"-eq", INTEQ, BINOP}, 151 {"-ne", INTNE, BINOP}, 152 {"-ge", INTGE, BINOP}, 153 {"-gt", INTGT, BINOP}, 154 {"-le", INTLE, BINOP}, --- 448 unchanged lines hidden --- | 148 {"!=", STRNE, BINOP}, 149 {"<", STRLT, BINOP}, 150 {">", STRGT, BINOP}, 151 {"-eq", INTEQ, BINOP}, 152 {"-ne", INTNE, BINOP}, 153 {"-ge", INTGE, BINOP}, 154 {"-gt", INTGT, BINOP}, 155 {"-le", INTLE, BINOP}, --- 448 unchanged lines hidden --- |