about summary refs log tree commit diff
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
parent1f86bccc2d7dc7d2e1c8a0f262735d83a7b0857f (diff)
downloadzsh-9bbe45297c22d3979c935e412254d4ac376ca4bc.tar.gz
zsh-9bbe45297c22d3979c935e412254d4ac376ca4bc.tar.xz
zsh-9bbe45297c22d3979c935e412254d4ac376ca4bc.zip
11147: TRAPZERR tests
-rw-r--r--ChangeLog7
-rw-r--r--Test/08traps.ztst27
2 files changed, 33 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 67d2419ea..2c55366c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-04  Peter Stephenson  <pws@cambridgesiliconradio.com>
+
+	* 11147: Test/08traps.ztst: test for trap bugs fixed in
+	11026 and 11066.
+
 2000-05-04  Sven Wischnowsky  <wischnow@informatik.hu-berlin.de>
 
 	* 11145: Src/lex.c: parse_subst_string() should use modified
@@ -94,7 +99,7 @@
 
 2000-05-02  Peter Stephenson  <pws@cambridgesiliconradio.com>
 
-	* 11066: Src/exec.c: suppress doing in and/or when at the end
+	* 11066: Src/exec.c: suppress doing ZERR traps at the end
 	of a sequence of &&/|| when another sublist follows.
 
 2000-05-02  Oliver Kiddle  <opk@zsh.org>
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!