summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-misc
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-misc')
-rw-r--r--shell/ash_test/ash-misc/exitcode_trap7.right2
-rwxr-xr-xshell/ash_test/ash-misc/exitcode_trap7.tests7
2 files changed, 9 insertions, 0 deletions
diff --git a/shell/ash_test/ash-misc/exitcode_trap7.right b/shell/ash_test/ash-misc/exitcode_trap7.right
new file mode 100644
index 0000000..07d66e9
--- /dev/null
+++ b/shell/ash_test/ash-misc/exitcode_trap7.right
@@ -0,0 +1,2 @@
+Start
+Ok:0
diff --git a/shell/ash_test/ash-misc/exitcode_trap7.tests b/shell/ash_test/ash-misc/exitcode_trap7.tests
new file mode 100755
index 0000000..9772a7b
--- /dev/null
+++ b/shell/ash_test/ash-misc/exitcode_trap7.tests
@@ -0,0 +1,7 @@
+$THIS_SH -c '
+cleanup() { set +e; false; }
+set -eu
+trap cleanup EXIT
+echo Start
+'
+echo Ok:$?