about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-05-04 11:46:19 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-05-04 11:46:19 +0000
commit9bbe45297c22d3979c935e412254d4ac376ca4bc (patch)
treea1ec8ba01e7cdc5bf4fe92e94c81afc3b2391193 /Test
parent1f86bccc2d7dc7d2e1c8a0f262735d83a7b0857f (diff)
downloadzsh-9bbe45297c22d3979c935e412254d4ac376ca4bc.tar.gz
zsh-9bbe45297c22d3979c935e412254d4ac376ca4bc.tar.xz
zsh-9bbe45297c22d3979c935e412254d4ac376ca4bc.zip
11147: TRAPZERR tests
Diffstat (limited to 'Test')
-rw-r--r--Test/08traps.ztst27
1 files changed, 27 insertions, 0 deletions
diff --git a/Test/08traps.ztst b/Test/08traps.ztst
index 5ede57fdb..641a50ad2 100644
--- a/Test/08traps.ztst
+++ b/Test/08traps.ztst
@@ -148,3 +148,30 @@
 >end of fn
 >finish
 
+  TRAPZERR() { print 'ERR-or!'; }
+  f() { print f; false; }
+  t() { print t; }
+  f
+  f && t
+  t && f && true
+  t && f
+  testunset() {
+    setopt localtraps
+    unset -f TRAPZERR
+    print testunset
+    false
+    true
+  }
+  testunset
+  f
+1: more sophisticated error trapping
+>f
+>ERR-or!
+>f
+>t
+>t
+>f
+>ERR-or!
+>testunset
+>f
+>ERR-or!