summaryrefslogtreecommitdiff
path: root/t/t4013/diff.show_--stat_side
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2016-06-30 04:16:18 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-07-06 07:43:29 -0700
commit9b67c9942eba3b1a6b008ddab8ee6e542bd3de6b (patch)
treea6d4b3ca849e32ac8355e06f373de35362cc45d9 /t/t4013/diff.show_--stat_side
parentGit 2.9 (diff)
downloadtgif-9b67c9942eba3b1a6b008ddab8ee6e542bd3de6b.tar.xz
tests: factor portable signal check out of t0005
In POSIX shells, a program which exits due to a signal generally has an exit code of 128 plus the signal number. However, ksh uses 256 plus the signal number. We've accounted for that in t0005, but not in other tests. Let's pull out the logic so we can use it elsewhere. It would be nice for debugging if this additionally printed errors to stderr, like our other test_* helpers. But we're going to need to use it in other places besides the innards of a test_expect block. So let's leave it as generic as possible. Note that we also leave the magic "3" for Windows out of the generic helper. This is an artifact of the way we use raise() to kill ourselves in test-sigchain.c, and will not necessarily apply to all programs. So it's better to keep it out of the helper, to reduce the chance of confusing it with a real call to exit(3). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.show_--stat_side')
0 files changed, 0 insertions, 0 deletions