xref: /freebsd/bin/sh/tests/expansion/arith6.0 (revision 193d9e768ba63fcfb187cfd17f461f7d41345048)
1# $FreeBSD$
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