summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Test')
-rw-r--r--Test/C03traps.ztst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index d179dc46d..4b2843a47 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -450,6 +450,20 @@
   fn
 1:ERRRETURN in "else" branch (regression test)
 
+  $ZTST_testdir/../Src/zsh -f =(<<<"
+  if false; then
+    :
+  else
+    if [[ -n '' ]]; then
+        a=2  
+    fi
+    print Yes
+  fi
+  ")
+0:ERRRETURN when false "if" is the first statement in an "else" (regression)
+>Yes
+F:Must be tested with a top-level script rather than source or function
+
 %clean
 
   rm -f TRAPEXIT