aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-trap
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-trap')
-rw-r--r--shell/hush_test/hush-trap/savetrap.right5
-rwxr-xr-xshell/hush_test/hush-trap/savetrap.tests7
2 files changed, 10 insertions, 2 deletions
diff --git a/shell/hush_test/hush-trap/savetrap.right b/shell/hush_test/hush-trap/savetrap.right
index 2d33427aa..9cfd7a56c 100644
--- a/shell/hush_test/hush-trap/savetrap.right
+++ b/shell/hush_test/hush-trap/savetrap.right
@@ -1,3 +1,8 @@
+trap -- 'echo Exiting' EXIT
trap -- 'echo WINCH!' SIGWINCH
+trap -- 'echo Exiting' EXIT
+trap -- 'echo WINCH!' SIGWINCH
+trap -- 'echo Exiting' EXIT
trap -- 'echo WINCH!' SIGWINCH
Done
+Exiting
diff --git a/shell/hush_test/hush-trap/savetrap.tests b/shell/hush_test/hush-trap/savetrap.tests
index 6492e86a2..c2b312fb8 100755
--- a/shell/hush_test/hush-trap/savetrap.tests
+++ b/shell/hush_test/hush-trap/savetrap.tests
@@ -1,6 +1,9 @@
+trap 'echo Exiting' EXIT
trap 'echo WINCH!' SIGWINCH
v=` trap `
-echo $v
+echo "$v"
+v=$( trap )
+echo "$v"
v=`trap`
-echo $v
+echo "$v"
echo Done