Re-integrate mainline
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / pp_hot
index 6bd3151..9a4b0a0 100644 (file)
   glob failed (child exited with status %d%s)  [Perl_do_readline] <<TODO
 
   Deep recursion on subroutine \"%s\"          [Perl_sub_crush_depth]
-     sub fred { fred() if $a++ < 200} fred()
+    sub fred { fred() if $a++ < 200} fred()
 
   Deep recursion on anonymous subroutine       [Perl_sub_crush_depth]
-     $a = sub { &$a if $a++ < 200} &$a
+    $a = sub { &$a if $a++ < 200} &$a
 
+  Possible Y2K bug: about to append an integer to '19' [pp_concat]
+    $x     = "19$yy\n";
 
 __END__
 # pp_hot.c [pp_print]
@@ -189,4 +191,25 @@ $b = sub
 
 &$b ;
 EXPECT
-
+########
+# pp_hot.c [pp_concat]
+use warnings 'misc';
+use Config;
+BEGIN {
+    unless ($Config{ccflags} =~ /Y2KWARN/) {
+       print "SKIPPED\n# perl not built with -DPERL_Y2KWARN";
+       exit 0;
+    }
+}
+my $x;
+my $yy = 78;
+$x     = "19$yy\n";
+$x     = "19" . $yy . "\n";
+$x     = "319$yy\n";
+$x     = "319" . $yy . "\n";
+no warnings 'misc';
+$x     = "19$yy\n";
+$x     = "19" . $yy . "\n";
+EXPECT
+Possible Y2K bug: about to append an integer to '19' at - line 12.
+Possible Y2K bug: about to append an integer to '19' at - line 13.