This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Have newCONSTSUB pass the length to newXS
[perl5.git] / t / op / goto.t
index 075def6..f2f9162 100644 (file)
@@ -10,7 +10,7 @@ BEGIN {
 
 use warnings;
 use strict;
-plan tests => 77;
+plan tests => 78;
 our $TODO;
 
 my $deprecated = 0;
@@ -415,7 +415,11 @@ sub recurse2 {
     my $x = shift;
     $_[0] ? +1 + recurse1($_[0] - 1) : 0
 }
+my $w = 0;
+$SIG{__WARN__} = sub { ++$w };
 is(recurse1(500), 500, 'recursive goto &foo');
+is $w, 0, 'no recursion warnings for "no warnings; goto &sub"';
+delete $SIG{__WARN__};
 
 # [perl #32039] Chained goto &sub drops data too early. 
 
@@ -500,12 +504,15 @@ format CHOLET =
 wellington
 .
 $foo .= "(1)";
-my $cholet;
-open(CHOLET, ">", \$cholet);
-write CHOLET;
-close CHOLET;
-$foo .= "(".$cholet.")";
-is($foo, "(0)(1)(wellington\n)", "label before format decl");
+SKIP: {
+    skip_if_miniperl("no dynamic loading on miniperl, so can't load PerlIO::scalar", 1);
+    my $cholet;
+    open(CHOLET, ">", \$cholet);
+    write CHOLET;
+    close CHOLET;
+    $foo .= "(".$cholet.")";
+    is($foo, "(0)(1)(wellington\n)", "label before format decl");
+}
 
 $foo = "(A)";
 if($foo eq $foo) {