author | Pavel Roskin <proski@gnu.org> | |
Thu, 11 Aug 2005 16:00:40 +0000 (12:00 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 12 Aug 2005 01:26:16 +0000 (18:26 -0700) | ||
commit | 41184273d173c252532b3aba730ee7fdf35291f4 | |
tree | 0bc87413c16aefcbfb5d896043f7fec6b9065262 | tree | snapshot |
parent | 4d9d62fa7ca01c481d224e2a2187e38ec2f0996a | commit | diff |
[PATCH] Trapping exit in tests, using return for errors: further fixes.
"return" from a test would leave the exit trap set, which could cause a
spurious error message if it's the last test in the script or
--immediate is used.
The easiest solution would be to have a global trap that is set when
test-lib.sh is sourced and unset either by test_done(), error() or by
test_failure_() with --immediate.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
"return" from a test would leave the exit trap set, which could cause a
spurious error message if it's the last test in the script or
--immediate is used.
The easiest solution would be to have a global trap that is set when
test-lib.sh is sourced and unset either by test_done(), error() or by
test_failure_() with --immediate.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/test-lib.sh | diff | blob | history |