arith3.0 revision 204017
1204017Sjilles# $FreeBSD: head/tools/regression/bin/sh/expansion/arith3.0 204017 2010-02-17 22:25:22Z jilles $ 2204017Sjilles 3204017Sjillesfailures=0 4204017Sjilles 5204017Sjillescheck() { 6204017Sjilles if [ $(($1)) != $2 ]; then 7204017Sjilles failures=$((failures+1)) 8204017Sjilles echo "For $1, expected $2 actual $(($1))" 9204017Sjilles fi 10204017Sjilles} 11204017Sjilles 12204017Sjillescheck "1 << 1 + 1 | 1" 5 13204017Sjilles 14204017Sjillesexit $((failures != 0)) 15