Re: [PATCH] Avoid using non-portable `echo -n` in tests.
- From
Jeff King <peff@peff.net>
- Date
- Oct 31, 2008, 18:24 UTC
- Message-ID
- <20081031182456.GC3230@sigill.intra.peff.net>
- In-Reply-To
- <1225429753-70109-1-git-send-email-benji@silverinsanity.com>
On Fri, Oct 31, 2008 at 01:09:13AM -0400, Brian Gernhardt wrote:
Show 5 quoted lines
> Not all /bin/sh have a builtin echo that recognizes -n. Using printf > is far more portable. > > Discovered on OS X 10.5.5 in t4030-diff-textconv.sh and changed in all > the test scripts.
Hmph. I think this is a good patch, and there is precedent in the past (20fa04ea, 2aad957, 9754563). But I am surprised this was not caught by our recent autobuilding project.
However, it seems to work on FreeBSD (which makes it doubly weird that it is broken on OS X). On Solaris, the /bin/sh is so horribly broken that I have to use bash anyway. Commit 9754563 claims breakage on AIX, but it looks like Mike is doing the AIX builds with bash.
So I guess we just need an OS X autobuild. ;)
> t/t4030-diff-textconv.sh | 2 +-
And of course this one was me, but I blame JSixt, whose test I just mindlessly copied. ;)
-Peff