* Test t4118 fails on Mac OS X due to dependency on GNU sed behaviour
@ 2006-12-02 20:14 Marco Roeland
0 siblings, 0 replies; only message in thread
From: Marco Roeland @ 2006-12-02 20:14 UTC (permalink / raw)
To: git
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]
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-02 20:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-02 20:14 Test t4118 fails on Mac OS X due to dependency on GNU sed behaviour Marco Roeland
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).