about summary refs log tree commit diff
path: root/Test/A01grammar.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-05-13 16:17:04 +0100
committerPeter Stephenson <pws@zsh.org>2015-05-13 16:17:04 +0100
commitec57c91b586a7682fcdb08c3704c9214cddfa5e7 (patch)
tree6baa5dd3f864f4ddec5496c29913a13e7a00f16f /Test/A01grammar.ztst
parent9c3aeef99a64c44e5a37170c9440c591f223bb4a (diff)
downloadzsh-ec57c91b586a7682fcdb08c3704c9214cddfa5e7.tar.gz
zsh-ec57c91b586a7682fcdb08c3704c9214cddfa5e7.tar.xz
zsh-ec57c91b586a7682fcdb08c3704c9214cddfa5e7.zip
users/20203: nested functions in always blocks when exit pending
Diffstat (limited to 'Test/A01grammar.ztst')
-rw-r--r--Test/A01grammar.ztst22
1 files changed, 22 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
index f04dddaa8..2de291906 100644
--- a/Test/A01grammar.ztst
+++ b/Test/A01grammar.ztst
@@ -589,3 +589,25 @@
 >success2
 >read it
 >read it
+
+  (
+  mywrap() { echo BEGIN; true; echo END }
+  mytest() { { exit 3 } always { mywrap }; print Exited before this }
+  mytest
+  print Exited before this, too
+  )
+3:Exit and always block with functions: simple
+>BEGIN
+>END
+
+  (
+  mytrue() { echo mytrue; return 0 }
+  mywrap() { echo BEGIN; mytrue; echo END }
+  mytest() { { exit 4 } always { mywrap }; print Exited before this }
+  mytest
+  print Exited before this, too
+  )
+4:Exit and always block with functions: nested
+>BEGIN
+>mytrue
+>END