Permalink
Browse files
Make the test more consistent
- Loading branch information...
Showing
with
6 additions
and
6 deletions.
-
+6
−6
spec/type-compat.test.sh
|
|
@@ -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
|
|
|
|
|
|
|
0 comments on commit
439a44a