summaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authorPhilippe Altherr <philippe.altherr@gmail.com>2025-10-26 13:39:33 -0700
committerBart Schaefer <schaefer@zsh.org>2025-10-26 13:39:33 -0700
commit477c6890b0e9e934c5dbccb3f335da0f175f1a8f (patch)
tree335439f8059e56ec6d3edf2fb6dabdc8e23ae555 /Test
parent54002: silence compiler warning for static function (diff)
downloadzsh-477c6890b0e9e934c5dbccb3f335da0f175f1a8f.tar
zsh-477c6890b0e9e934c5dbccb3f335da0f175f1a8f.tar.gz
zsh-477c6890b0e9e934c5dbccb3f335da0f175f1a8f.tar.bz2
zsh-477c6890b0e9e934c5dbccb3f335da0f175f1a8f.tar.lz
zsh-477c6890b0e9e934c5dbccb3f335da0f175f1a8f.tar.xz
zsh-477c6890b0e9e934c5dbccb3f335da0f175f1a8f.tar.zst
zsh-477c6890b0e9e934c5dbccb3f335da0f175f1a8f.zip
53732: avoid tail-call exec in always block
Diffstat (limited to 'Test')
-rw-r--r--Test/A01grammar.ztst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
index 660602caf..a65dc57f1 100644
--- a/Test/A01grammar.ztst
+++ b/Test/A01grammar.ztst
@@ -720,6 +720,12 @@
>always 1
>try 2
+ () { { return 2 } always { return 3 } }
+2:Exit status of always block is ignored
+
+ () { ( { return 2 } always { ( return 3 ) } ) }
+2:Regression test for exit status of always block is ignored also in tailcalls
+
(
mywrap() { echo BEGIN; true; echo END }
mytest() { { exit 3 } always { mywrap }; print Exited before this }