summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/op/tr.t6
-rw-r--r--t/test.pl2
2 files changed, 6 insertions, 2 deletions
diff --git a/t/op/tr.t b/t/op/tr.t
index 3a4f610c02..b3661a4fea 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 9f4f03bfb8..179b2f19bc 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);