From: Marco Roeland <marco.roeland@xs4all.nl>
To: git@vger.kernel.org
Subject: Test t4118 fails on Mac OS X due to dependency on GNU sed behaviour
Date: Sat, 2 Dec 2006 21:14:10 +0100 [thread overview]
Message-ID: <20061202201410.GA6353@fiberbit.xs4all.nl> (raw)
Hello list!
Recently test t4118 was added to prepare for upcoming changes in
behaviour of GNU diff.
This test fails on Mac OS X. It turns out that in the end the failure
comes from a difference in the behaviour between GNU sed and the version
that comes with OS X.
The feature that is tested works fine, but the implementation of the
examination of the result fails.
The difference is that the OS X version of sed always ends the last line
with a newline character, even if it wasn't there in the input. Strictly
speaking this is POSIX specified behaviour that was changed in the GNU
version of sed in 1997, citing from the changelog for the historically
curious minded people:
Mon Jul 28 10:50:41 PDT 1997 Ken Pizzini <ken@gnu.org>
* sed.c, sed.h, execute.c: POSIX.2, section 4.55.7, says that
a newline must end *every* output line. But I think
that it is useful (when seding a binary file) to omit
a trailing newline if the input lacks one. Thus the addition of
POSIXLY_CORRECT behavior.
* execute.c: however, when seding multiple files my feeling
is that it makes sense to have each file but the last
behave as-if it ended in a newline. Modified read_pattern_space()
accordingly.
A workaround on Mac OS X is easy by for example just installing the GNU
version of sed from the 'fink' archive with "sudo apt-get install sed".
Funny enough the system 'diff' is already the GNU version, so the test
t4118 itself might even be necessary for upcoming feline versions of
OS X!
Unfortunately I myself don't see an elegant and portable fix in the test
itself... [hint]
--
reply other threads:[~2006-12-02 20:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061202201410.GA6353@fiberbit.xs4all.nl \
--to=marco.roeland@xs4all.nl \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).