aboutsummaryrefslogtreecommitdiff
path: root/testsuite/expr/expr-works
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-04-06 11:10:30 +0000
committerEric Andersen <andersen@codepoet.org>2004-04-06 11:10:30 +0000
commit650fe63467e693990cf357c51b74db3278088a56 (patch)
tree660b1fb0e4d7f99802a85cdd00166fafbf3132dc /testsuite/expr/expr-works
parent39396b95fc7c46bfa29ec576357fb7f8e755762c (diff)
downloadbusybox-w32-650fe63467e693990cf357c51b74db3278088a56.tar.gz
busybox-w32-650fe63467e693990cf357c51b74db3278088a56.tar.bz2
busybox-w32-650fe63467e693990cf357c51b74db3278088a56.zip
Kill off the old 'tests' stuff. Write a ton of new tests for the
'testsuite' dir. Fix a bunch of broken tests. Fix the testsuite 'runtest' script so it actually reports all failures and provides meaningful feedback. -Erik
Diffstat (limited to 'testsuite/expr/expr-works')
-rw-r--r--testsuite/expr/expr-works59
1 files changed, 59 insertions, 0 deletions
diff --git a/testsuite/expr/expr-works b/testsuite/expr/expr-works
new file mode 100644
index 000000000..af49ac4d5
--- /dev/null
+++ b/testsuite/expr/expr-works
@@ -0,0 +1,59 @@
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