xref: /freebsd/bin/sh/tests/parser/for2.0 (revision 22cf89c938886d14f5796fc49f9f020c23ea8eaf)
1
2# Common extensions to the 'for' syntax.
3
4nl='
5'
6list=' a b c'
7set -- $list
8for s2 in ";" ";$nl"; do
9	for s3 in "$nl" " "; do
10		r=''
11		eval "for i${s2}do${s3}r=\"\$r \$i\"; done"
12		[ "$r" = "$list" ] || exit 1
13	done
14done
15