Re: test &&-chain lint
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 20, 2015, 17:34 UTC
- Message-ID
- <xmqqoannfu84.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150320172406.GA15172@peff.net>
Jeff King <peff@peff.net> writes:
> Your case above is actually better spelled as test_expect_code, but
> there are more complex one-off cases that I solved using a {} block.Just for the record, test_expect_code expects only one possible good exit status and it does not allow us to say "0 is OK and 1 is also OK, everything else is bad", so it is not quite appropriate there.
> ... > So I dunno. I think "set -e" is kind of a dangerous lure.
Yes, I think we should stay away from it. &&-chaining is simpler to see what is going on, even though it is a bit more to type.
Thanks.