summaryrefslogtreecommitdiff
path: root/Test/C03traps.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/C03traps.ztst')
-rw-r--r--Test/C03traps.ztst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index e661aabd5..6f84e5db2 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -500,6 +500,15 @@
>Succeed 2
>Succeed 3
+ (set -e
+ if false; then
+ else
+ a=$(false)
+ print This should not appear
+ fi
+ )
+1:ERREXIT is triggered in an else block after a cmd subst returning false
+
fn() {
emulate -L zsh
setopt errreturn