This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
test for the Data::Dumper bug fixed by "Change newSVpvn("…", …) to newSVpvs("…")"
authorTony Cook <tony@develop-help.com>
Thu, 12 Jun 2014 03:50:22 +0000 (13:50 +1000)
committerTony Cook <tony@develop-help.com>
Thu, 12 Jun 2014 04:27:20 +0000 (14:27 +1000)
dist/Data-Dumper/t/dumper.t

index b7be257..624e0bb 100644 (file)
@@ -83,11 +83,11 @@ sub SKIP_TEST {
 $Data::Dumper::Useperl = 1;
 if (defined &Data::Dumper::Dumpxs) {
   print "### XS extension loaded, will run XS tests\n";
-  $TMAX = 432; $XS = 1;
+  $TMAX = 438; $XS = 1;
 }
 else {
   print "### XS extensions not loaded, will NOT run XS tests\n";
-  $TMAX = 216; $XS = 0;
+  $TMAX = 219; $XS = 0;
 }
 
 print "1..$TMAX\n";
@@ -1670,3 +1670,17 @@ OLD
     if $XS;
 }
 ############# 432
+
+{
+  sub foo {}
+  $WANT = <<'EOW';
+#*a = sub { "DUMMY" };
+#$b = \&a;
+EOW
+
+  TEST q(Data::Dumper->new([ \&foo, \\&foo ], [ "*a", "b" ])->Dump), "name of code in *foo";
+  local $TODO = "XS code broken";
+  TEST q(Data::Dumper->new([ \&foo, \\&foo ], [ "*a", "b" ])->Dumpxs), "name of code in *foo xs"
+    if $XS;
+}
+############# 436