t0005: use test_match_signal as appropriate
authorJeff King <peff@peff.net>
Fri, 24 Jun 2016 19:44:50 +0000 (15:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Jul 2016 14:44:25 +0000 (07:44 -0700)
The first test already uses this more portable construct
(that was where it was factored from initially), but the
later tests do a raw comparison against 141 to look for
SIGPIPE, which can fail on some shells and platforms.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0005-signals.sh
index 95f8c05eb43b018439543f0c54cb5d90c18b8a4f..46042f1f1338f628d5256f0e932a4037e98b34ab 100755 (executable)
@@ -42,12 +42,12 @@ test_expect_success 'create blob' '
 
 test_expect_success !MINGW 'a constipated git dies with SIGPIPE' '
        OUT=$( ((large_git; echo $? 1>&3) | :) 3>&1 ) &&
-       test "$OUT" -eq 141
+       test_match_signal 13 "$OUT"
 '
 
 test_expect_success !MINGW 'a constipated git dies with SIGPIPE even if parent ignores it' '
        OUT=$( ((trap "" PIPE; large_git; echo $? 1>&3) | :) 3>&1 ) &&
-       test "$OUT" -eq 141
+       test_match_signal 13 "$OUT"
 '
 
 test_done