sh: Add test for exit status of for loop without items.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 25 Dec 2011 17:35:56 +0000 (09:35 -0800)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 25 Dec 2011 17:35:56 +0000 (09:35 -0800)
commitc7e5ca9174c054125469d531b6f5726b7d557e61
treeda67a2ec613cb5b6203b693bff63c41d0fb91e84
parent15ea6933373df476420e501d6102fb6c852ce3f7
sh: Add test for exit status of for loop without items.

POSIX says the exit status of a for loop without any items shall be 0.
There are no exceptions if the exit status of the previous command was
not 0 or if the item list contains a command substitution with non-zero
exit status.

Obtained-from:  FreeBSD 226892
tools/regression/bin/sh/builtins/for1.0 [new file with mode: 0644]