1 # $FreeBSD: head/bin/sh/tests/expansion/arith10.0 218469 2011-02-08 23:23:55Z jilles $
6 if [ $(($1)) != $2 ]; then
7 failures=$((failures+1))
8 echo "For $1, expected $2 actual $(($1))"
16 check "0 && (ro = 2)" 0
18 check "1 || (ro = -1)" 1
20 check "0 && (rw += 1)" 0
22 check "1 || (rw += 1)" 1
24 check "0 ? 44 / 0 : 51" 51
25 check "0 ? ro = 3 : 52" 52
27 check "0 ? rw += 1 : 52" 52
29 check "1 ? 68 : 30 / 0" 68
30 check "2 ? 1 : (ro += 2)" 1
32 check "4 ? 1 : (rw += 1)" 1
35 exit $((failures != 0))