summaryrefslogtreecommitdiff
path: root/tests/cp/same-file
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cp/same-file')
-rwxr-xr-xtests/cp/same-file4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/cp/same-file b/tests/cp/same-file
index 908fe2e71..09c535c37 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -15,7 +15,9 @@ VERSION_CONTROL=numbered; export VERSION_CONTROL
pwd=`pwd`
actual=actual-$$
expected=expected-$$
-trap "cd $pwd; rm -rf $actual $expected dir" 0 1 2 3 15
+
+trap 'status=$?; cd $pwd; rm -rf $actual $expected && exit $status' 0
+trap 'exit $?' 1 2 13 15
exec 1> $actual