summaryrefslogtreecommitdiffhomepage
path: root/testsuite/expr/expr-works
blob: af49ac4d5a687d07c2330d45aa18f4cee178b477 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# busybox expr
busybox expr 1 \| 1
busybox expr 1 \| 0
busybox expr 0 \| 1
busybox expr 1 \& 1
busybox expr 0 \< 1
busybox expr 1 \> 0
busybox expr 0 \<= 1
busybox expr 1 \<= 1
busybox expr 1 \>= 0
busybox expr 1 \>= 1
busybox expr 1 + 2
busybox expr 2 - 1
busybox expr 2 \* 3
busybox expr 12 / 2
busybox expr 12 % 5


set +e
busybox expr 0 \| 0
if [ $? != 1 ] ; then
	exit 1;
fi;

busybox expr 1 \& 0
if [ $? != 1 ] ; then
	exit 1;
fi;

busybox expr 0 \& 1
if [ $? != 1 ] ; then
	exit 1;
fi;

busybox expr 0 \& 0
if [ $? != 1 ] ; then
	exit 1;
fi;

busybox expr 1 \< 0
if [ $? != 1 ] ; then
	exit 1;
fi;

busybox expr 0 \> 1
if [ $? != 1 ] ; then
	exit 1;
fi;

busybox expr 1 \<= 0
if [ $? != 1 ] ; then
	exit 1;
fi;

busybox expr 0 \>= 1
if [ $? != 1 ] ; then
	exit 1;
fi;