source: drbl_ui/backup/test_busybox/busybox-1.7.2/testsuite/expr/expr-works @ 55

Last change on this file since 55 was 20, checked in by chris, 17 years ago
File size: 776 bytes
Line 
1# busybox expr
2busybox expr 1 \| 1
3busybox expr 1 \| 0
4busybox expr 0 \| 1
5busybox expr 1 \& 1
6busybox expr 0 \< 1
7busybox expr 1 \> 0
8busybox expr 0 \<= 1
9busybox expr 1 \<= 1
10busybox expr 1 \>= 0
11busybox expr 1 \>= 1
12busybox expr 1 + 2
13busybox expr 2 - 1
14busybox expr 2 \* 3
15busybox expr 12 / 2
16busybox expr 12 % 5
17
18
19set +e
20busybox expr 0 \| 0
21if [ $? != 1 ] ; then
22  exit 1;
23fi;
24
25busybox expr 1 \& 0
26if [ $? != 1 ] ; then
27  exit 1;
28fi;
29
30busybox expr 0 \& 1
31if [ $? != 1 ] ; then
32  exit 1;
33fi;
34
35busybox expr 0 \& 0
36if [ $? != 1 ] ; then
37  exit 1;
38fi;
39
40busybox expr 1 \< 0
41if [ $? != 1 ] ; then
42  exit 1;
43fi;
44
45busybox expr 0 \> 1
46if [ $? != 1 ] ; then
47  exit 1;
48fi;
49
50busybox expr 1 \<= 0
51if [ $? != 1 ] ; then
52  exit 1;
53fi;
54
55busybox expr 0 \>= 1
56if [ $? != 1 ] ; then
57  exit 1;
58fi;
59
Note: See TracBrowser for help on using the repository browser.