Thread (11 messages) flat view 11 messages, 8 authors, 2016-06-15

Re: [PATCH] Avoid using non-portable `echo -n` in tests.

From: Mike Ralphson <hidden>
Date: 2016-06-15 22:45:34

2008/10/31 Jeff King [off-list ref]:
On Fri, Oct 31, 2008 at 01:09:13AM -0400, Brian Gernhardt wrote:
quoted
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.
I've just retested with AIX's standard sh (ksh) instead of bash and
there were only two issues.

Oddly enough, one was with the (original) printfs in
t4030-diff-textconv.sh. AIX seems to ship with a perfectly good
printf, but if you install the GNU tools from the 'IBM toolbox for
AIX' (and prepend them to your PATH) it replaces that printf with one
which doesn't grok the "\\1\\n" syntax, but I think wants it to be
"\\01\\n".

The other problem is the 'trap exit' one discussed here:
http://thread.gmane.org/gmane.comp.version-control.git/92748/focus=92944

Mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help