git: sh: Add test for exit status of for loop without items.

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Dec 25 10:09:05 PST 2011


commit c7e5ca9174c054125469d531b6f5726b7d557e61
Author: Peter Avalos <pavalos at dragonflybsd.org>
Date:   Sun Dec 25 09:35:56 2011 -0800

    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

Summary of changes:
 tools/regression/bin/sh/builtins/for1.0 |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100644 tools/regression/bin/sh/builtins/for1.0

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c7e5ca9174c054125469d531b6f5726b7d557e61


-- 
DragonFly BSD source repository





More information about the Commits mailing list