xref: /dragonfly/tools/regression/bin/sh/parser/for2.0 (revision 2b7dbe20)
1# $FreeBSD: head/bin/sh/tests/parser/for2.0 218889 2011-02-20 14:18:58Z jilles $
2
3# Common extensions to the 'for' syntax.
4
5nl='
6'
7list=' a b c'
8set -- $list
9for s2 in ";" ";$nl"; do
10	for s3 in "$nl" " "; do
11		r=''
12		eval "for i${s2}do${s3}r=\"\$r \$i\"; done"
13		[ "$r" = "$list" ] || exit 1
14	done
15done
16