arith6.0 revision 302408
1# $FreeBSD: stable/11/bin/sh/tests/expansion/arith6.0 215550 2010-11-19 22:25:32Z jilles $ 2 3v1=1\ +\ 1 4v2=D 5v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 6f() { v4="$*"; } 7 8while [ ${#v2} -lt 1250 ]; do 9 eval $v2=$((3+${#v2})) $v3=$((4-${#v2})) 10 eval f $(($v2+ $v1 +$v3)) 11 if [ $v4 -ne 9 ]; then 12 echo bad: $v4 -ne 9 at ${#v2} 13 fi 14 v2=x$v2 15 v3=y$v3 16done 17