mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
50928: fix tests for 50897, mention behavior change in NEWS
This commit is contained in:
parent
61610ea4bd
commit
1ba8714a7a
4 changed files with 20 additions and 11 deletions
|
@ -1,5 +1,8 @@
|
||||||
2022-11-09 Bart Schaefer <schaefer@zsh.org>
|
2022-11-09 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 50928: News, Src/exec.c, Test/C03traps.ztst: fix tests for 50897,
|
||||||
|
mention behavior change in NEWS
|
||||||
|
|
||||||
* 50922: Src/exec.c, Src/jobs.c: fix additional cases of signals
|
* 50922: Src/exec.c, Src/jobs.c: fix additional cases of signals
|
||||||
for current shell jobs on the right of a pipeline. Backs out
|
for current shell jobs on the right of a pipeline. Backs out
|
||||||
part of 50874.
|
part of 50874.
|
||||||
|
|
9
NEWS
9
NEWS
|
@ -4,6 +4,15 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH
|
||||||
|
|
||||||
Note also the list of incompatibilities in the README file.
|
Note also the list of incompatibilities in the README file.
|
||||||
|
|
||||||
|
Changes since 5.9
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Handling of ERR_EXIT is corrected when the final status of a structured
|
||||||
|
command (for, select, while, repeat, if, case, or a list in braces) is
|
||||||
|
nonzero. To be compatible with other shells, "zsh -e" now exits in
|
||||||
|
those circumstances, whereas previous versions did not. This does not
|
||||||
|
affect the handling of nonzero status within conditional statements.
|
||||||
|
|
||||||
Changes since 5.8.1
|
Changes since 5.8.1
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
|
|
@ -1442,6 +1442,8 @@ execlist(Estate state, int dont_change_job, int exiting)
|
||||||
execsimple(state);
|
execsimple(state);
|
||||||
else
|
else
|
||||||
execpline(state, code, ltype, (ltype & Z_END) && exiting);
|
execpline(state, code, ltype, (ltype & Z_END) && exiting);
|
||||||
|
if (unset(ERRRETURN))
|
||||||
|
this_noerrexit = noerrexit;
|
||||||
state->pc = next;
|
state->pc = next;
|
||||||
goto sublist_done;
|
goto sublist_done;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -713,7 +713,7 @@ F:Must be tested with a top-level script rather than source or function
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
fn() {
|
fn() {
|
||||||
setopt err_return
|
setopt localoptions err_return
|
||||||
fn2 || true
|
fn2 || true
|
||||||
}
|
}
|
||||||
fn
|
fn
|
||||||
|
@ -726,8 +726,7 @@ F:Must be tested with a top-level script rather than source or function
|
||||||
done
|
done
|
||||||
print OK
|
print OK
|
||||||
)
|
)
|
||||||
0:ERR_EXIT not triggered by status 1 at end of for
|
1:ERR_EXIT triggered by status 1 at end of for
|
||||||
>OK
|
|
||||||
|
|
||||||
(setopt err_exit
|
(setopt err_exit
|
||||||
integer x=0
|
integer x=0
|
||||||
|
@ -736,8 +735,7 @@ F:Must be tested with a top-level script rather than source or function
|
||||||
done
|
done
|
||||||
print OK
|
print OK
|
||||||
)
|
)
|
||||||
0:ERR_EXIT not triggered by status 1 at end of while
|
1:ERR_EXIT triggered by status 1 at end of while
|
||||||
>OK
|
|
||||||
|
|
||||||
(setopt err_exit
|
(setopt err_exit
|
||||||
repeat 1; do
|
repeat 1; do
|
||||||
|
@ -745,8 +743,7 @@ F:Must be tested with a top-level script rather than source or function
|
||||||
done
|
done
|
||||||
print OK
|
print OK
|
||||||
)
|
)
|
||||||
0:ERR_EXIT not triggered by status 1 at end of repeat
|
1:ERR_EXIT triggered by status 1 at end of repeat
|
||||||
>OK
|
|
||||||
|
|
||||||
(setopt err_exit
|
(setopt err_exit
|
||||||
if true; then
|
if true; then
|
||||||
|
@ -754,8 +751,7 @@ F:Must be tested with a top-level script rather than source or function
|
||||||
fi
|
fi
|
||||||
print OK
|
print OK
|
||||||
)
|
)
|
||||||
0:ERR_EXIT not triggered by status 1 at end of if
|
1:ERR_EXIT triggered by status 1 at end of if
|
||||||
>OK
|
|
||||||
|
|
||||||
(setopt err_exit
|
(setopt err_exit
|
||||||
{
|
{
|
||||||
|
@ -763,8 +759,7 @@ F:Must be tested with a top-level script rather than source or function
|
||||||
}
|
}
|
||||||
print OK
|
print OK
|
||||||
)
|
)
|
||||||
0:ERR_EXIT not triggered by status 1 at end of { }
|
1:ERR_EXIT triggered by status 1 at end of { }
|
||||||
>OK
|
|
||||||
|
|
||||||
unsetopt err_exit err_return
|
unsetopt err_exit err_return
|
||||||
(setopt err_exit
|
(setopt err_exit
|
||||||
|
|
Loading…
Reference in a new issue