1215550Sjilles# $FreeBSD: releng/11.0/bin/sh/tests/expansion/arith6.0 215550 2010-11-19 22:25:32Z jilles $ 2215550Sjilles 3215550Sjillesv1=1\ +\ 1 4215550Sjillesv2=D 5215550Sjillesv3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 6215550Sjillesf() { v4="$*"; } 7215550Sjilles 8215550Sjilleswhile [ ${#v2} -lt 1250 ]; do 9215550Sjilles eval $v2=$((3+${#v2})) $v3=$((4-${#v2})) 10215550Sjilles eval f $(($v2+ $v1 +$v3)) 11215550Sjilles if [ $v4 -ne 9 ]; then 12215550Sjilles echo bad: $v4 -ne 9 at ${#v2} 13215550Sjilles fi 14215550Sjilles v2=x$v2 15215550Sjilles v3=y$v3 16215550Sjillesdone 17