about summary refs log tree commit diff
path: root/Test/C03traps.ztst
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-10-03 22:11:09 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-10-03 22:11:09 -0700
commitcb26e11c70f95c72e300e1f4f16b33e4e5f54d21 (patch)
tree96a618762650ca2675459d40a67150ac7a31d006 /Test/C03traps.ztst
parentb581c3fece76c87ed86ae9fc704d0fcf208a79d3 (diff)
downloadzsh-cb26e11c70f95c72e300e1f4f16b33e4e5f54d21.tar.gz
zsh-cb26e11c70f95c72e300e1f4f16b33e4e5f54d21.tar.xz
zsh-cb26e11c70f95c72e300e1f4f16b33e4e5f54d21.zip
unposted: back out 36707, add test case for 36766
Diffstat (limited to 'Test/C03traps.ztst')
-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