1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-24 21:11:03 +02:00

45304: Do execute the always block even when the try/always block itself is the last command.

Fixes the test added in the previous commit (workers/45305).
This commit is contained in:
Daniel Shahaf 2020-01-15 18:02:33 +00:00
parent fb3865514c
commit 7ca2b06501
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2020-01-16 Daniel Shahaf <danielsh@apache.org>
* 45304: Src/loop.c, Test/A01grammar.ztst: Do execute the always
block even when the try/always block itself is the last command.
2020-01-15 dana <dana@dana.is>
* 45292: Test/D02glob.ztst: Add regression test for macOS stat(2)

View File

@ -742,7 +742,7 @@ exectry(Estate state, int do_exec)
/* The :try clause */
++try_tryflag;
execlist(state, 1, do_exec);
execlist(state, 1, 0);
--try_tryflag;
/* Don't record errflag here, may be reset. However, */

View File

@ -930,5 +930,5 @@ F:Note that the behaviour of 'exit' inside try-list inside a function is unspeci
>or false
$ZTST_testdir/../Src/zsh -fc '{ ( ) } always { echo foo }'
-f:exec last command optimization inhibited for try/always
0:exec last command optimization inhibited for try/always
>foo