diff options
author | jilles <jilles@FreeBSD.org> | 2011-10-28 23:02:21 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-10-28 23:02:21 +0000 |
commit | 5940d062c3743ab439929ab2bc109d6ba729172a (patch) | |
tree | 898f2b4e47e138b3a8c0a4b0fa253d24176ed897 /tools | |
parent | 15734d833a763e24f0ea8d7eaf18076bec06ed73 (diff) | |
download | FreeBSD-src-5940d062c3743ab439929ab2bc109d6ba729172a.zip FreeBSD-src-5940d062c3743ab439929ab2bc109d6ba729172a.tar.gz |
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.
Diffstat (limited to 'tools')
-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 0000000..cd55e2c --- /dev/null +++ b/tools/regression/bin/sh/builtins/for1.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ + +false +for i in `false`; do exit 3; done |