]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/arith1.sub
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / arith1.sub
CommitLineData
b80f6443
JA
1# test of redone post-increment and post-decrement code
2echo $(( 4-- ))
3echo $(( 4++ ))
4echo $(( 4 -- ))
5echo $(( 4 ++ ))
6
7(( array[0]++ ))
8echo ${array}
9
10(( array[0] ++ ))
11echo ${array}
12
13(( a++ ))
14echo $a
15(( a ++ ))
16echo $a
17
18echo $(( a ++ + 4 ))
19echo $a
20
21echo $(( a+++4 ))
22echo $a
23
24echo $(( a---4 ))
25echo $a
26
27echo $(( a -- + 4 ))
28echo $a
29
30echo $(( a -- - 4 ))
31echo $a
32
33(( ++ + 7 ))
34
35(( ++ ))
36echo $(( +++7 ))
37echo $(( ++ + 7 ))
38(( -- ))