summary refs log tree commit diff
path: root/Test/C03traps.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-09-12 18:56:40 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-09-12 18:56:40 +0000
commitade705cf5b36cdaad29ec7e21796adc3a0854f2c (patch)
tree1be48025d7b94a02a9928ab010ba5d490e2bd5fc /Test/C03traps.ztst
parent154b7351f4b246077ef03217f33b11de27c350f9 (diff)
downloadzsh-ade705cf5b36cdaad29ec7e21796adc3a0854f2c.tar.gz
zsh-ade705cf5b36cdaad29ec7e21796adc3a0854f2c.tar.xz
zsh-ade705cf5b36cdaad29ec7e21796adc3a0854f2c.zip
28253: document -h argument to atribute commands
Diffstat (limited to 'Test/C03traps.ztst')
-rw-r--r--Test/C03traps.ztst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index 1c4006cc4..321f5e956 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -371,6 +371,23 @@
 0: EXIT trap set in command substitution
 >command substitution exited
 
+   (cd ..; $ZTST_exe -fc 'setopt posixtraps;
+   TRAPEXIT() { print Exited; }
+   fn1() { trap; }
+   setopt localtraps # should be ignored by EXIT
+   fn2() { TRAPEXIT() { print No, really exited; } }
+   fn1
+   fn2
+   fn1')
+0:POSIX_TRAPS option
+>TRAPEXIT () {
+>	print Exited
+>}
+>TRAPEXIT () {
+>	print No, really exited
+>}
+>No, really exited
+
 %clean
 
   rm -f TRAPEXIT