shell: enable more tests which are passing now

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2021-09-25 22:25:19 +02:00
parent d84a604830
commit 62e433131b
6 changed files with 103 additions and 71 deletions

View File

@@ -70,6 +70,19 @@ octal, hex
263 263
255 255
40 40
other bases
10 10
10 10
10 10
10 10
10 10
10 10
36 36
36 36
62 62
63 63
missing number after base
0 0
hush: arithmetic syntax error
hush: divide by zero
hush: can't execute 'let': No such file or directory
@@ -149,6 +162,10 @@ hush: arithmetic syntax error
-7
7
7
-7 -7
-7 -7
7 7
7 7
8 12
hush: arithmetic syntax error
42

View File

@@ -142,25 +142,25 @@ echo 255 $(( 0xff ))
echo 40 $(( 8 ^ 32 ))
#ash# # other bases
#ash# echo 10 $(( 16#a ))
#ash# echo 10 $(( 32#a ))
#ash# echo 10 $(( 56#a ))
#ash# echo 10 $(( 64#a ))
#ash#
#ash# echo 10 $(( 16#A ))
#ash# echo 10 $(( 32#A ))
#ash# echo 36 $(( 56#A ))
#ash# echo 36 $(( 64#A ))
#ash#
#ash# echo 62 $(( 64#@ ))
#ash# echo 63 $(( 64#_ ))
echo other bases
echo 10 $(( 16#a ))
echo 10 $(( 32#a ))
echo 10 $(( 56#a ))
echo 10 $(( 64#a ))
echo 10 $(( 16#A ))
echo 10 $(( 32#A ))
echo 36 $(( 56#A ))
echo 36 $(( 64#A ))
echo 62 $(( 64#@ ))
echo 63 $(( 64#_ ))
#ash# # weird bases (error)
#ash# echo $(( 3425#56 ))
#ash# # missing number after base
#ash# echo 0 $(( 2# ))
echo missing number after base
echo 0 $(( 2# ))
# these should generate errors
( echo $(( 7 = 43 )) )

View File

@@ -46,12 +46,8 @@ echo $(( ---7 ))
echo $(( ++7 ))
( echo $(( ++ + 7 )) )
# bash 3.2: -7
#ash# echo -7 $(( ++-7 ))
# bash 3.2: -7
#ash# echo -7 $(( ++ - 7 ))
echo -7 $(( ++-7 ))
echo -7 $(( ++ - 7 ))
# bash 3.2: 7
#ash# echo 7 $(( +--7 ))
# bash 3.2: 7
#ash# echo 7 $(( -- + 7 ))
echo 7 $(( +--7 ))
echo 7 $(( -- + 7 ))