opnsense-src/tools/regression/bin/sh/parser/for2.0
Jilles Tjoelker a9942298fe sh: Split off some special behaviour into separate tests.
This allows some other shells to pass the tests for basic behaviour.
2011-02-20 14:18:58 +00:00

15 lines
234 B
Text

# $FreeBSD$
# Common extensions to the 'for' syntax.
nl='
'
list=' a b c'
set -- $list
for s2 in ";" ";$nl"; do
for s3 in "$nl" " "; do
r=''
eval "for i${s2}do${s3}r=\"\$r \$i\"; done"
[ "$r" = "$list" ] || exit 1
done
done