Imported from ../bash-2.05.tar.gz.
[platform/upstream/bash.git] / tests / trap.tests
index bcf16e5..24f25ab 100644 (file)
@@ -40,6 +40,15 @@ trap '' int
 
 trap
 
+# exit 0 in exit trap should set exit status
+(
+set -e
+trap 'exit 0' EXIT
+false   
+echo bad
+)
+echo $?
+
 # hmmm...should this set the handling to SIG_IGN for children, too?
 trap '' USR2
 ./trap1.sub