On Thu, Dec 05, 2002 at 11:49:01PM +0900, FUJISHIMA Satsuki wrote:
> Does anyone see this?
> both -CURRENT and -STABLE fail at the same place.
> 
> note: GNU sed 3.02 from ports passed this test.
> 
> /usr/src/tools/regression/usr.bin/sed$ make
> Running test G
> PASS: Test G detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test P
> PASS: Test P detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test psl
> PASS: Test psl detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test bcb
> PASS: Test bcb detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test y
> --- regress.y.out     Fri Jun 28 01:07:51 2002
> +++ - Thu Dec  5 23:26:19 2002
> @@ -1 +1 @@
> -fOO
> \ No newline at end of file
> +fOO
> FAIL: Test y failed: regression detected.  See above. (in 
>/usr/src/tools/regression/usr.bin/sed)
> *** Error code 1
> 
> Stop in /usr/src/tools/regression/usr.bin/sed.
> 
The usr.bin/sed/process.c,v 1.21 change is responsible for the "breakage":

: revision 1.21
: date: 2002/06/22 01:42:26;  author: tjr;  state: Exp;  lines: +10 -11
: Don't store newlines at the end of each line in the hold/pattern spaces,
: instead add the newline when the pattern space is printed. Make the `G' and
: `H' commands add a newline to the space before the data, remove bogus
: addition of newline from `x' command.
: 
: PR:           29790, 38195

But I'm pretty confident that what we do now is correct, and it seems to
be in agreement with POSIX.1-2001, which says:

: In default operation, sed cyclically shall append a line of input,
: less its terminating <newline>, into the pattern space.
: ...
: Whenever the pattern space is written to standard output or a named
: file, sed shall immediately follow it with a <newline>.

(This regression test turned into a failure only after a
contrib/diff/util.c,v 1.5 commit.)


Cheers,
-- 
Ruslan Ermilov          Sysadmin and DBA,
[EMAIL PROTECTED]           Sunbay Software AG,
[EMAIL PROTECTED]          FreeBSD committer,
+380.652.512.251        Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

Attachment: msg48149/pgp00000.pgp
Description: PGP signature

Reply via email to