summaryrefslogtreecommitdiffhomepage
path: root/shell/hush_test/hush-arith/arith2.sub
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-arith/arith2.sub')
-rwxr-xr-xshell/hush_test/hush-arith/arith2.sub10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/hush_test/hush-arith/arith2.sub b/shell/hush_test/hush-arith/arith2.sub
index 9105059db..29f9471d6 100755
--- a/shell/hush_test/hush-arith/arith2.sub
+++ b/shell/hush_test/hush-arith/arith2.sub
@@ -1,4 +1,4 @@
-# bash 3.2 apparently thinks that ++7 is 7 etc
+# ++ and -- are not inc/dec operators on non-variables, they are + + and - - sequences
( echo $(( --7 )) )
( echo $(( ++7 )) )
( echo $(( -- 7 )) )
@@ -37,13 +37,13 @@ echo 4 $(( 4 - -- a ))
echo 0 $a
#ash# (( -- ))
-# bash 3.2 apparently thinks that ---7 is -7
-#ash# echo $(( ---7 ))
+# -- is not a dec operator on non-variable, it is the - - sequence
+echo $(( ---7 ))
( echo $(( -- - 7 )) )
#ash# (( ++ ))
-# bash 3.2: 7
-#ash# echo 7 $(( ++7 ))
+# ++ is not a inc operator on non-variable, it is the + + sequence
+echo $(( ++7 ))
( echo $(( ++ + 7 )) )
# bash 3.2: -7