aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-arith/arith2.sub
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-01-28 20:13:33 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-01-28 20:13:33 +0100
commitf19e3c1c6c96e3c709ac732ff70c586521f792d3 (patch)
treef2b16759f1eae8ac09205f0fb29f822d70610a36 /shell/hush_test/hush-arith/arith2.sub
parent675d24aeaff29dbce6dc116a4b7c9f6026ed5069 (diff)
downloadbusybox-f19e3c1c6c96e3c709ac732ff70c586521f792d3.tar.gz
shell: handle $((NUM++...) like bash does. Closes 10706
function old new delta evaluate_string 680 729 +49 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-arith/arith2.sub')
-rwxr-xr-xshell/hush_test/hush-arith/arith2.sub12
1 files changed, 6 insertions, 6 deletions
diff --git a/shell/hush_test/hush-arith/arith2.sub b/shell/hush_test/hush-arith/arith2.sub
index f7e3c9235..9105059db 100755
--- a/shell/hush_test/hush-arith/arith2.sub
+++ b/shell/hush_test/hush-arith/arith2.sub
@@ -23,14 +23,14 @@
echo 5 $(( 4 + ++a ))
echo 1 $a
-# ash doesn't handle it right...
-#ash# echo 6 $(( 4+++a ))
-#ash# echo 2 $a
+# this is treated as 4 + ++a
+echo 6 $(( 4+++a ))
+echo 2 $a
a=2
-# ash doesn't handle it right...
-#ash# echo 3 $(( 4---a ))
-#ash# echo 1 $a
+# this is treated as 4 - --a
+echo 3 $(( 4---a ))
+echo 1 $a
a=1
echo 4 $(( 4 - -- a ))