summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-10-06 09:48:48 +0100
committerPeter Stephenson <pws@zsh.org>2016-10-06 09:48:48 +0100
commitffa6c76253b9833379893e87e8504eb03b4e954e (patch)
tree057138f8d0d00b532599c8aa6b1f85a485b71d09 /Test
parentbcb52460f3069e2e4e3b05f966a2efd40471e366 (diff)
downloadzsh-ffa6c76253b9833379893e87e8504eb03b4e954e.tar.gz
zsh-ffa6c76253b9833379893e87e8504eb03b4e954e.tar.xz
zsh-ffa6c76253b9833379893e87e8504eb03b4e954e.zip
39578: Test more ERR_RETURN cases with "&&" and functions
Diffstat (limited to 'Test')
-rw-r--r--Test/C03traps.ztst30
1 files changed, 30 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index 5057dcf6e..74b83f33a 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -596,6 +596,36 @@ F:Must be tested with a top-level script rather than source or function
 >before-out
 >before-in
 
+  (setopt err_return
+    fn() {
+      print before-in
+      false && false
+      print after-in
+    }
+    print before-out
+    fn
+    print after-out
+  )
+0:ERR_RETURN not triggered on LHS of "&&" in function
+>before-out
+>before-in
+>after-in
+>after-out
+
+  (setopt err_return
+    fn() {
+      print before-in
+      true && false
+      print after-in
+    }
+    print before-out
+    fn
+    print after-out
+  )
+1:ERR_RETURN triggered on RHS of "&&" in function
+>before-out
+>before-in
+
 %clean
 
   rm -f TRAPEXIT