about summary refs log tree commit diff
path: root/Test/A01grammar.ztst
diff options
context:
space:
mode:
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