[perl #32039] Chained goto &sub drops data too early.
[p5sagit/p5-mst-13.2.git] / t / op / magic.t
index 04cf718..1c02b5b 100755 (executable)
@@ -36,7 +36,7 @@ sub skip {
     return 1;
 }
 
-print "1..53\n";
+print "1..54\n";
 
 $Is_MSWin32  = $^O eq 'MSWin32';
 $Is_NetWare  = $^O eq 'NetWare';
@@ -349,7 +349,7 @@ else {
 }
 
 if ($Is_miniperl) {
-    skip ("miniperl can't rely on loading %Errno");
+    skip ("miniperl can't rely on loading %Errno") for 1..2;
 } else {
    no warnings 'void';
 
@@ -411,3 +411,15 @@ ok "@+" eq "10 1 6 10";
     }
     ok $ok;
 }
+
+# Test for bug [perl #27839]
+{
+    my $x;
+    sub f {
+       "abc" =~ /(.)./;
+       $x = "@+";
+       return @+;
+    };
+    my @y = f();
+    ok( $x eq "@y", "return a magic array ($x) vs (@y)" );
+}