t6030: use modern test_* helpers
commite4e6e8b4e3aeb3f7237b83f2125c9deee221ff77
authorJeff King <peff@peff.net>
Fri, 20 Mar 2015 10:13:05 +0000 (20 06:13 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Mar 2015 18:35:55 +0000 (20 11:35 -0700)
tree168e5e8c3162b7add07cb35fe53f4772e7d8954c
parentd8cd32792a0a8a52ff4f5f4bb74f9044bcb9a97a
t6030: use modern test_* helpers

We can get rid of a lot of hand-rolled error messages by
using test_must_fail and test_expect_code. The existing code
was careful to use "|| return 1" when breaking the
&&-chain, but it did fool --chain-lint; the new code is more
idiomatic.

We also add some uses of test_when_finished, which is less
cryptic and more robust than putting code at the end of a
test. In two cases we run "git bisect reset" from a
subshell, which is a problem for test_when_finished (it
would not run). However, in both of these cases, we are
performing the tests in one-off sub-repos, so we do not need
to clean up at all (and in fact it is nicer not to if the
user wants to inspect the trash directory after a failure).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6030-bisect-porcelain.sh