Re: [PATCH v2 4/5] t3301: use test_must_fail instead of !
- From
Jeff King <peff@peff.net>
- Date
- Feb 15, 2009, 18:18 UTC
- Message-ID
- <20090215181818.GA2291@coredump.intra.peff.net>
- In-Reply-To
- <200902151711.45099.trast@student.ethz.ch>
On Sun, Feb 15, 2009 at 05:11:40PM +0100, Thomas Rast wrote:
Show 10 quoted lines
> > > + MSG=3 test_must_fail git notes edit > > > > test_must_fail is a shell function, and we have precedence 2d60615 (tests: > > Avoid single-shot environment export for shell function invocation, > > 2009-01-26) to avoid this construct. > > Bah. I really have a bad memory, don't I? > > Is there a "bare minimum" POSIX shell that I can run the tests under, > to save myself such embarassment in the future?
Using "dash" will catch bash-isms, and is pretty commonly available, I think. But this behavior, IIRC, happens on FreeBSD's /bin/sh, which is derived from "ash" (so is "dash", but I they have long since diverged).
There are even more quirks on more exotic systems, I expect, though I have to admit that I gave up on Solaris and just started using bash there. :)
So I don't think there is a catch-all shell that will help you, but some "ash" variant is probably your best bet.
-Peff