From: Michael G. Schwern Date: Fri, 22 Jul 2005 11:51:15 +0000 (-0700) Subject: Re: [perl #36622] y/// at end of file X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d65d7d555c9e685ae54e22c9f9eb33ec635ea81;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #36622] y/// at end of file Message-ID: <20050722185115.GB28829@windhund.schwern.org> p4raw-id: //depot/perl@25252 --- diff --git a/t/op/tr.t b/t/op/tr.t index 3a4f610..b3661a4 100755 --- a/t/op/tr.t +++ b/t/op/tr.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 99; +plan tests => 100; my $Is_EBCDIC = (ord('i') == 0x89 & ord('J') == 0xd1); @@ -383,3 +383,7 @@ is( scalar keys %foo, 0, " doesn't extend the hash"); $x = \"foo"; is( $x =~ tr/A/A/, 2, 'non-modifying tr/// on a scalar ref' ); is( ref $x, 'SCALAR', " doesn't stringify its argument" ); + +# rt.perl.org 36622. Perl didn't like a y/// at end of file. No trailing +# newline allowed. +fresh_perl_is(q[$_ = "foo"; y/A-Z/a-z/], ''); diff --git a/t/test.pl b/t/test.pl index 9f4f03b..179b2f1 100644 --- a/t/test.pl +++ b/t/test.pl @@ -579,7 +579,7 @@ sub _fresh_perl { {if (-e _ and -f _)} } - print TEST $prog, "\n"; + print TEST $prog; close TEST or die "Cannot close $tmpfile: $!"; my $results = runperl(%$runperl_args);