t0005: test git exit code from signal death

When a sub-process dies with a signal, we convert the exit code to the shell convention of 128+sig. Callers of git may be relying on this behavior, so let's make sure it does not break. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jun 1, 2013 at 13:24 UTC e828908aa97ce0441b0c00a640b314c041fbd9e2
1 file changed +7
t/t0005-signals.sh
+7
@@ -20,4 +20,11 @@ test_expect_success 'sigchain works' '
20 test_cmp expect actual
21 '
22
23 +test_expect_success 'signals are propagated using shell convention' '
24 + # we use exec here to avoid any sub-shell interpretation
25 + # of the exit code
26 + git config alias.sigterm "!exec test-sigchain" &&
27 + test_expect_code 143 git sigterm
28 +'
29 +
30 test_done