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.
This commit is contained in:
parent
1933a67cf4
commit
06842f4c3e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226892
4
tools/regression/bin/sh/builtins/for1.0
Normal file
4
tools/regression/bin/sh/builtins/for1.0
Normal file
@ -0,0 +1,4 @@
|
||||
# $FreeBSD$
|
||||
|
||||
false
|
||||
for i in `false`; do exit 3; done
|
Loading…
Reference in New Issue
Block a user