xref: /freebsd/bin/sh/tests/expansion/trim4.0 (revision 2e3f49888ec8851bafb22011533217487764fdb0)
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