diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2011-10-28 23:02:21 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2011-10-28 23:02:21 +0000 |
commit | 06842f4c3ed1c8d89af9f2e0cc122eefaa8274b5 (patch) | |
tree | 898f2b4e47e138b3a8c0a4b0fa253d24176ed897 | |
parent | 1933a67cf4124b9d08487c5d6032060222b9e5e2 (diff) | |
download | src-06842f4c3ed1c8d89af9f2e0cc122eefaa8274b5.tar.gz src-06842f4c3ed1c8d89af9f2e0cc122eefaa8274b5.zip |
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.
Notes
Notes:
svn path=/head/; revision=226892
-rw-r--r-- | tools/regression/bin/sh/builtins/for1.0 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/for1.0 b/tools/regression/bin/sh/builtins/for1.0 new file mode 100644 index 000000000000..cd55e2ca029e --- /dev/null +++ b/tools/regression/bin/sh/builtins/for1.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ + +false +for i in `false`; do exit 3; done |