source: MondoRescue/branches/3.2/mindi-busybox/testsuite/expr/expr-works@ 3232

Last change on this file since 3232 was 2725, checked in by Bruno Cornec, 13 years ago
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File size: 775 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;
Note: See TracBrowser for help on using the repository browser.