about summary refs log tree commit diff
path: root/Test/08traps.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/08traps.ztst')
-rw-r--r--Test/08traps.ztst22
1 files changed, 22 insertions, 0 deletions
diff --git a/Test/08traps.ztst b/Test/08traps.ztst
index 10eb48ba9..5ede57fdb 100644
--- a/Test/08traps.ztst
+++ b/Test/08traps.ztst
@@ -126,3 +126,25 @@
   sleep 2
 0: Nested `trap ... TERM', triggered on outer loop
 >TERM1
+
+  TRAPZERR() { print error activated; }
+  fn() { print start of fn; false; print end of fn; }
+  fn
+  fn() {
+    setopt localoptions localtraps
+    unfunction TRAPZERR
+    print start of fn
+    false
+    print end of fn
+  }
+  fn
+  unfunction TRAPZERR
+  print finish
+0: basic localtraps handling
+>start of fn
+>error activated
+>end of fn
+>start of fn
+>end of fn
+>finish
+