From cb26e11c70f95c72e300e1f4f16b33e4e5f54d21 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sat, 3 Oct 2015 22:11:09 -0700 Subject: unposted: back out 36707, add test case for 36766 --- Test/C03traps.ztst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Test/C03traps.ztst') 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 -- cgit 1.4.1