aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-09-25 22:25:19 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-09-25 22:35:17 +0200
commit62e433131b289ea90e465cf0c5f78c8c226fc692 (patch)
tree2279c66136d95f1b77484aec147608fe458e8095 /shell/hush_test
parentd84a604830a7ee3f8fb5f3908ae0d54513393a20 (diff)
downloadbusybox-w32-62e433131b289ea90e465cf0c5f78c8c226fc692.tar.gz
busybox-w32-62e433131b289ea90e465cf0c5f78c8c226fc692.tar.bz2
busybox-w32-62e433131b289ea90e465cf0c5f78c8c226fc692.zip
shell: enable more tests which are passing now
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-arith/arith.right17
-rwxr-xr-xshell/hush_test/hush-arith/arith.tests30
-rwxr-xr-xshell/hush_test/hush-arith/arith2.sub14
3 files changed, 37 insertions, 24 deletions
diff --git a/shell/hush_test/hush-arith/arith.right b/shell/hush_test/hush-arith/arith.right
index 2c389caea..a8612295e 100644
--- a/shell/hush_test/hush-arith/arith.right
+++ b/shell/hush_test/hush-arith/arith.right
@@ -70,6 +70,19 @@ octal, hex
70263 263 70263 263
71255 255 71255 255
7240 40 7240 40
73other bases
7410 10
7510 10
7610 10
7710 10
7810 10
7910 10
8036 36
8136 36
8262 62
8363 63
84missing number after base
850 0
73hush: arithmetic syntax error 86hush: arithmetic syntax error
74hush: divide by zero 87hush: divide by zero
75hush: can't execute 'let': No such file or directory 88hush: can't execute 'let': No such file or directory
@@ -149,6 +162,10 @@ hush: arithmetic syntax error
149-7 162-7
1507 1637
1517 1647
165-7 -7
166-7 -7
1677 7
1687 7
1528 12 1698 12
153hush: arithmetic syntax error 170hush: arithmetic syntax error
15442 17142
diff --git a/shell/hush_test/hush-arith/arith.tests b/shell/hush_test/hush-arith/arith.tests
index a7aded17d..6b707486c 100755
--- a/shell/hush_test/hush-arith/arith.tests
+++ b/shell/hush_test/hush-arith/arith.tests
@@ -142,25 +142,25 @@ echo 255 $(( 0xff ))
142 142
143echo 40 $(( 8 ^ 32 )) 143echo 40 $(( 8 ^ 32 ))
144 144
145#ash# # other bases 145echo other bases
146#ash# echo 10 $(( 16#a )) 146echo 10 $(( 16#a ))
147#ash# echo 10 $(( 32#a )) 147echo 10 $(( 32#a ))
148#ash# echo 10 $(( 56#a )) 148echo 10 $(( 56#a ))
149#ash# echo 10 $(( 64#a )) 149echo 10 $(( 64#a ))
150#ash# 150
151#ash# echo 10 $(( 16#A )) 151echo 10 $(( 16#A ))
152#ash# echo 10 $(( 32#A )) 152echo 10 $(( 32#A ))
153#ash# echo 36 $(( 56#A )) 153echo 36 $(( 56#A ))
154#ash# echo 36 $(( 64#A )) 154echo 36 $(( 64#A ))
155#ash# 155
156#ash# echo 62 $(( 64#@ )) 156echo 62 $(( 64#@ ))
157#ash# echo 63 $(( 64#_ )) 157echo 63 $(( 64#_ ))
158 158
159#ash# # weird bases (error) 159#ash# # weird bases (error)
160#ash# echo $(( 3425#56 )) 160#ash# echo $(( 3425#56 ))
161 161
162#ash# # missing number after base 162echo missing number after base
163#ash# echo 0 $(( 2# )) 163echo 0 $(( 2# ))
164 164
165# these should generate errors 165# these should generate errors
166( echo $(( 7 = 43 )) ) 166( echo $(( 7 = 43 )) )
diff --git a/shell/hush_test/hush-arith/arith2.sub b/shell/hush_test/hush-arith/arith2.sub
index 29f9471d6..8d7918114 100755
--- a/shell/hush_test/hush-arith/arith2.sub
+++ b/shell/hush_test/hush-arith/arith2.sub
@@ -46,12 +46,8 @@ echo $(( ---7 ))
46echo $(( ++7 )) 46echo $(( ++7 ))
47( echo $(( ++ + 7 )) ) 47( echo $(( ++ + 7 )) )
48 48
49# bash 3.2: -7 49echo -7 $(( ++-7 ))
50#ash# echo -7 $(( ++-7 )) 50echo -7 $(( ++ - 7 ))
51# bash 3.2: -7 51
52#ash# echo -7 $(( ++ - 7 )) 52echo 7 $(( +--7 ))
53 53echo 7 $(( -- + 7 ))
54# bash 3.2: 7
55#ash# echo 7 $(( +--7 ))
56# bash 3.2: 7
57#ash# echo 7 $(( -- + 7 ))