summaryrefslogtreecommitdiff
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-06-24 19:45:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-06 14:44:25 (GMT)
commit2472448c88ad72bd7d02d473590d2c17c2cd7424 (patch)
treeb4de83ade1b6a241cc0bb081c3d4c996c6138b52 /t/test-lib-functions.sh
parent6f5f9d747690b91e212c91138ae9efd1bfbfbb7d (diff)
downloadgit-2472448c88ad72bd7d02d473590d2c17c2cd7424.zip
git-2472448c88ad72bd7d02d473590d2c17c2cd7424.tar.gz
git-2472448c88ad72bd7d02d473590d2c17c2cd7424.tar.bz2
test_must_fail: use test_match_signal
In 8bf4bec (add "ok=sigpipe" to test_must_fail and use it to fix flaky tests, 2015-11-27), test_must_fail learned to recognize "141" as a sigpipe failure. However, testing for a signal is more complicated than that; we should use test_match_signal to implement more portable checking. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 15ef3f8..ca40a12 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -612,7 +612,7 @@ test_must_fail () {
then
echo >&2 "test_must_fail: command succeeded: $*"
return 1
- elif test $exit_code -eq 141 && list_contains "$_test_ok" sigpipe
+ elif test_match_signal 13 $exit_code && list_contains "$_test_ok" sigpipe
then
return 0
elif test $exit_code -gt 129 && test $exit_code -le 192