This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
uni/variables.t: Output unexpected warnings
authorKarl Williamson <khw@cpan.org>
Sat, 11 Jul 2015 18:08:42 +0000 (12:08 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 13 Jul 2015 18:17:41 +0000 (12:17 -0600)
This helps debug when the test fails.

t/uni/variables.t

index d88dc8c..e87e1f6 100644 (file)
@@ -243,7 +243,9 @@ for ( 0x0 .. 0xff ) {
                 splice @warnings, $i, 1 if $warnings[$i] =~ /is no longer supported/;
             }
         }
-        ok(@warnings == 0, "  ... and doesn't generate any warnings");
+        if (! ok(@warnings == 0, "  ... and doesn't generate any warnings")) {
+            note join "\n", @warnings;
+        }
         $tests++;
     }
     elsif (! @warnings) {