Skip to content

Commit

Permalink
Make the test more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Chu committed Aug 11, 2017
1 parent a7c03b4 commit 439a44a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/type-compat.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ echo "$s|$i|$j"

### append in arith context
declare s
(( s=1 ))
(( s+=2 )) # arith add
(( s='1 '))
(( s+=' 2 ')) # arith add
declare -i i
(( i=1 ))
(( i+=2 ))
(( i='1 ' ))
(( i+=' 2 ' ))
declare -i j
(( j=x )) # treated like zero
(( j+=2 ))
(( j='x ' )) # treated like zero
(( j+=' 2 ' ))
echo "$s|$i|$j"
# stdout: 3|3|2

Expand Down

0 comments on commit 439a44a

Please sign in to comment.