1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1982-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * David Korn <dgk@research.att.com> *
19 ***********************************************************************/
29 #include "FEATURE/options"
32 * These are the valid test operators
35 #define TEST_ARITH 040 /* arithmetic operators */
36 #define TEST_BINOP 0200 /* binary operator */
37 #define TEST_PATTERN 0100 /* turn off bit for pattern compares */
39 #define TEST_NE (TEST_ARITH|9)
40 #define TEST_EQ (TEST_ARITH|4)
41 #define TEST_GE (TEST_ARITH|5)
42 #define TEST_GT (TEST_ARITH|6)
43 #define TEST_LE (TEST_ARITH|7)
44 #define TEST_LT (TEST_ARITH|8)
45 #define TEST_OR (TEST_BINOP|1)
46 #define TEST_AND (TEST_BINOP|2)
47 #define TEST_SNE (TEST_PATTERN|1)
48 #define TEST_SEQ (TEST_PATTERN|14)
59 extern int test_unop(int, const char*);
60 extern int test_inode(const char*, const char*);
61 extern int test_binop(int, const char*, const char*);
63 extern const char sh_opttest
[];
64 extern const char test_opchars
[];
65 extern const char e_argument
[];
66 extern const char e_missing
[];
67 extern const char e_badop
[];
68 extern const char e_tstbegin
[];
69 extern const char e_tstend
[];
71 #endif /* TEST_ARITH */