[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: NPavel Roskin <proski@gnu.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
Showing
想要评论请 注册 或 登录