6 if [ $(($1)) != $2 ]; then
7 failures=$((failures+1))
8 echo "For $1, expected $2 actual $(($1))"
15 check "a = b = c = d = 1" 1
16 check "a == 1 && b == 1 && c == 1 && d == 1" 1
17 check "a += b += c += d" 4
18 check "a == 4 && b == 3 && c == 2 && d == 1" 1
20 exit $((failures != 0))