xref: /freebsd/bin/sh/tests/expansion/arith6.0 (revision 1719886f6d08408b834d270c59ffcfd821c8f63a)
1
2v1=1\ +\ 1
3v2=D
4v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
5f() { v4="$*"; }
6
7while [ ${#v2} -lt 1250 ]; do
8	eval $v2=$((3+${#v2})) $v3=$((4-${#v2}))
9	eval f $(($v2+ $v1 +$v3))
10	if [ $v4 -ne 9 ]; then
11		echo bad: $v4 -ne 9 at ${#v2}
12	fi
13	v2=x$v2
14	v3=y$v3
15done
16