sh: Split off some special behavior into separate regress tests.
[dragonfly.git] / tools / regression / bin / sh / parser / for2.0
1 # $FreeBSD: src/tools/regression/bin/sh/parser/for2.0,v 1.1 2011/02/20 14:18:58 jilles Exp $
2
3 # Common extensions to the 'for' syntax.
4
5 nl='
6 '
7 list=' a b c'
8 set -- $list
9 for 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
15 done