mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-05 16:21:44 +01:00
test-lib.sh: renamed die...()s to trap...()s and exit...()
Now the function names more accurately describes what the functions do.
This commit is contained in:
parent
6a49e8a51e
commit
1ca752fa36
1 changed files with 7 additions and 7 deletions
|
@ -223,15 +223,15 @@ test_fixed=0
|
||||||
test_broken=0
|
test_broken=0
|
||||||
test_success=0
|
test_success=0
|
||||||
|
|
||||||
_die_common () {
|
_exit_common () {
|
||||||
code=$?
|
code=$?
|
||||||
trap - EXIT
|
trap - EXIT
|
||||||
set +ex
|
set +ex
|
||||||
rm -rf "$TEST_TMPDIR"
|
rm -rf "$TEST_TMPDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
die () {
|
trap_exit () {
|
||||||
_die_common
|
_exit_common
|
||||||
if test -n "$GIT_EXIT_OK"
|
if test -n "$GIT_EXIT_OK"
|
||||||
then
|
then
|
||||||
exit $code
|
exit $code
|
||||||
|
@ -245,8 +245,8 @@ die () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
die_signal () {
|
trap_signal () {
|
||||||
_die_common
|
_exit_common
|
||||||
echo >&6 "FATAL: $0: interrupted by signal" $((code - 128))
|
echo >&6 "FATAL: $0: interrupted by signal" $((code - 128))
|
||||||
exit $code
|
exit $code
|
||||||
}
|
}
|
||||||
|
@ -254,8 +254,8 @@ die_signal () {
|
||||||
GIT_EXIT_OK=
|
GIT_EXIT_OK=
|
||||||
# Note: TEST_TMPDIR *NOT* exported!
|
# Note: TEST_TMPDIR *NOT* exported!
|
||||||
TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
|
TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
|
||||||
trap 'die' EXIT
|
trap 'trap_exit' EXIT
|
||||||
trap 'die_signal' HUP INT TERM
|
trap 'trap_signal' HUP INT TERM
|
||||||
|
|
||||||
test_decode_color () {
|
test_decode_color () {
|
||||||
sed -e 's/.\[1m/<WHITE>/g' \
|
sed -e 's/.\[1m/<WHITE>/g' \
|
||||||
|
|
Loading…
Reference in a new issue