xref: /freebsd/bin/sh/tests/expansion/trim4.0 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1
2v1=/homes/SOME_USER
3v2=
4v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
5
6# Trigger bug in VSTRIMRIGHT processing STADJUST() call in expand.c:subevalvar()
7while [ ${#v2} -lt 2000 ]; do
8	v4="${v2} ${v1%/*} $v3"
9	if [ ${#v4} -ne $((${#v2} + ${#v3} + 8)) ]; then
10		echo bad: ${#v4} -ne $((${#v2} + ${#v3} + 8))
11	fi
12	v2=x$v2
13	v3=y$v3
14done
15