diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-09-25 22:25:19 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-09-25 22:35:17 +0200 |
commit | 62e433131b289ea90e465cf0c5f78c8c226fc692 (patch) | |
tree | 2279c66136d95f1b77484aec147608fe458e8095 /shell/hush_test | |
parent | d84a604830a7ee3f8fb5f3908ae0d54513393a20 (diff) | |
download | busybox-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.right | 17 | ||||
-rwxr-xr-x | shell/hush_test/hush-arith/arith.tests | 30 | ||||
-rwxr-xr-x | shell/hush_test/hush-arith/arith2.sub | 14 |
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 | |||
70 | 263 263 | 70 | 263 263 |
71 | 255 255 | 71 | 255 255 |
72 | 40 40 | 72 | 40 40 |
73 | other bases | ||
74 | 10 10 | ||
75 | 10 10 | ||
76 | 10 10 | ||
77 | 10 10 | ||
78 | 10 10 | ||
79 | 10 10 | ||
80 | 36 36 | ||
81 | 36 36 | ||
82 | 62 62 | ||
83 | 63 63 | ||
84 | missing number after base | ||
85 | 0 0 | ||
73 | hush: arithmetic syntax error | 86 | hush: arithmetic syntax error |
74 | hush: divide by zero | 87 | hush: divide by zero |
75 | hush: can't execute 'let': No such file or directory | 88 | hush: can't execute 'let': No such file or directory |
@@ -149,6 +162,10 @@ hush: arithmetic syntax error | |||
149 | -7 | 162 | -7 |
150 | 7 | 163 | 7 |
151 | 7 | 164 | 7 |
165 | -7 -7 | ||
166 | -7 -7 | ||
167 | 7 7 | ||
168 | 7 7 | ||
152 | 8 12 | 169 | 8 12 |
153 | hush: arithmetic syntax error | 170 | hush: arithmetic syntax error |
154 | 42 | 171 | 42 |
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 | ||
143 | echo 40 $(( 8 ^ 32 )) | 143 | echo 40 $(( 8 ^ 32 )) |
144 | 144 | ||
145 | #ash# # other bases | 145 | echo other bases |
146 | #ash# echo 10 $(( 16#a )) | 146 | echo 10 $(( 16#a )) |
147 | #ash# echo 10 $(( 32#a )) | 147 | echo 10 $(( 32#a )) |
148 | #ash# echo 10 $(( 56#a )) | 148 | echo 10 $(( 56#a )) |
149 | #ash# echo 10 $(( 64#a )) | 149 | echo 10 $(( 64#a )) |
150 | #ash# | 150 | |
151 | #ash# echo 10 $(( 16#A )) | 151 | echo 10 $(( 16#A )) |
152 | #ash# echo 10 $(( 32#A )) | 152 | echo 10 $(( 32#A )) |
153 | #ash# echo 36 $(( 56#A )) | 153 | echo 36 $(( 56#A )) |
154 | #ash# echo 36 $(( 64#A )) | 154 | echo 36 $(( 64#A )) |
155 | #ash# | 155 | |
156 | #ash# echo 62 $(( 64#@ )) | 156 | echo 62 $(( 64#@ )) |
157 | #ash# echo 63 $(( 64#_ )) | 157 | echo 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 | 162 | echo missing number after base |
163 | #ash# echo 0 $(( 2# )) | 163 | echo 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 )) | |||
46 | echo $(( ++7 )) | 46 | echo $(( ++7 )) |
47 | ( echo $(( ++ + 7 )) ) | 47 | ( echo $(( ++ + 7 )) ) |
48 | 48 | ||
49 | # bash 3.2: -7 | 49 | echo -7 $(( ++-7 )) |
50 | #ash# echo -7 $(( ++-7 )) | 50 | echo -7 $(( ++ - 7 )) |
51 | # bash 3.2: -7 | 51 | |
52 | #ash# echo -7 $(( ++ - 7 )) | 52 | echo 7 $(( +--7 )) |
53 | 53 | echo 7 $(( -- + 7 )) | |
54 | # bash 3.2: 7 | ||
55 | #ash# echo 7 $(( +--7 )) | ||
56 | # bash 3.2: 7 | ||
57 | #ash# echo 7 $(( -- + 7 )) | ||