commit d020afe4a99674cac985dfc693d4f3a4d0bd5823 from: Sven M. Hallberg date: Sun May 25 11:38:25 2025 UTC assert-exercise: remove tempfiles via an exit trap This ensures it happens also on a premature exit (127). commit - a3a317d2dfdb47ad07017e2f99ce051f9b001ffc commit + d020afe4a99674cac985dfc693d4f3a4d0bd5823 blob - d0b629b57c5c1ae9f83c7404a481d9f9bc564258 blob + 6b78f371dccf9a58e21afaf1d2df6c56e02de7ef --- tests/assert-exercise +++ tests/assert-exercise @@ -16,6 +16,7 @@ err=$1.err expout=$1.expout experr=$1.experr +trap "rm -f $tst $out $err $expout $experr" EXIT >$tst >$err >$out >$expout >$experr # expected output @@ -32,7 +33,3 @@ $exe "$@" $tst 1>$out 2>$err test "$?" = "127" && exit 127 diff -u $experr $err >&2 && \ diff -u $expout $out >&2 -RET=$? - -rm -f $tst $out $err $expout $experr -exit $RET