]> git.ipfire.org Git - thirdparty/git.git/commit
[PATCH] Trapping exit in tests, using return for errors: further fixes.
authorPavel Roskin <proski@gnu.org>
Thu, 11 Aug 2005 16:00:40 +0000 (12:00 -0400)
committerJunio C Hamano <junkio@cox.net>
Fri, 12 Aug 2005 01:26:16 +0000 (18:26 -0700)
commit41184273d173c252532b3aba730ee7fdf35291f4
tree0bc87413c16aefcbfb5d896043f7fec6b9065262
parent4d9d62fa7ca01c481d224e2a2187e38ec2f0996a
[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>
t/test-lib.sh