diff options
| author | Tomi Ollila <tomi.ollila@iki.fi> | 2016-05-28 15:39:28 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-06-11 13:03:00 -0300 |
| commit | 1ca752fa362e7c245d88b6cc742d178824f2a50c (patch) | |
| tree | 046e5f0ac0ec692e5cc6f733107b21e211e0a45e /test | |
| parent | 6a49e8a51e0591d92ae187af80cf1bedfdd8e09b (diff) | |
test-lib.sh: renamed die...()s to trap...()s and exit...()
Now the function names more accurately describes what the functions do.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test-lib.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh index 29ec0083..05e203d7 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -223,15 +223,15 @@ test_fixed=0 test_broken=0 test_success=0 -_die_common () { +_exit_common () { code=$? trap - EXIT set +ex rm -rf "$TEST_TMPDIR" } -die () { - _die_common +trap_exit () { + _exit_common if test -n "$GIT_EXIT_OK" then exit $code @@ -245,8 +245,8 @@ die () { fi } -die_signal () { - _die_common +trap_signal () { + _exit_common echo >&6 "FATAL: $0: interrupted by signal" $((code - 128)) exit $code } @@ -254,8 +254,8 @@ die_signal () { GIT_EXIT_OK= # Note: TEST_TMPDIR *NOT* exported! TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX") -trap 'die' EXIT -trap 'die_signal' HUP INT TERM +trap 'trap_exit' EXIT +trap 'trap_signal' HUP INT TERM test_decode_color () { sed -e 's/.\[1m/<WHITE>/g' \ |
