b88d2faf | 05-Feb-2012 |
Peter Avalos <pavalos@dragonflybsd.org> |
sh: Fix some bugs with exit status from case containing ;&.
Also, rework evalcase() to not evaluate any tree. Instead, return the NCLISTFALLTHRU node and handle it in evaltree().
Fixed bugs:
* If
sh: Fix some bugs with exit status from case containing ;&.
Also, rework evalcase() to not evaluate any tree. Instead, return the NCLISTFALLTHRU node and handle it in evaltree().
Fixed bugs:
* If a ;& list with non-zero exit status is followed by an empty ;; or final list, the exit status of the case command should be equal to the exit status of the ;& list, not 0.
* An empty ;& case should not reset $?.
Obtained-from: FreeBSD 230161
show more ...
|
c79cd3b3 | 05-Feb-2012 |
Peter Avalos <pavalos@dragonflybsd.org> |
sh: Fix two bugs with case and exit status:
* If no pattern is matched, POSIX says the exit status shall be 0 (even if there are command substitutions). * If a pattern is matched and there are no
sh: Fix two bugs with case and exit status:
* If no pattern is matched, POSIX says the exit status shall be 0 (even if there are command substitutions). * If a pattern is matched and there are no command substitutions, the first command should see the $? from before the case command, not always 0.
Obtained-from: FreeBSD 230154
show more ...
|
dbdce6a7 | 25-Dec-2011 |
Peter Avalos <pavalos@dragonflybsd.org> |
sh: Test that . /dev/null returns exit status 0 and does not preserve $?.
Preserving $? may cause problems particularly if set -e is in effect.
It may be useful to preserve the old value of $? in t
sh: Test that . /dev/null returns exit status 0 and does not preserve $?.
Preserving $? may cause problems particularly if set -e is in effect.
It may be useful to preserve the old value of $? in the dot script but this must not be implemented in such a way that it would break this test.
Obtained-from: FreeBSD 219390
show more ...
|
c7e5ca91 | 25-Dec-2011 |
Peter Avalos <pavalos@dragonflybsd.org> |
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
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
show more ...
|