This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/re/reg_mesg.t: Emit diagnostics on some more failing tests
authorKarl Williamson <khw@cpan.org>
Wed, 19 Feb 2020 16:47:16 +0000 (09:47 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 20 Feb 2020 01:45:57 +0000 (18:45 -0700)
t/re/reg_mesg.t

index 5fea6fe..9e8dc6d 100644 (file)
@@ -868,8 +868,10 @@ for my $strict ("",  "no warnings 'experimental::re_strict'; use re 'strict';")
                         if ($this_default_on || grep { $_ =~ /\Q(?[/ } @expect ) {
                            ok @warns > 0, "... and the warning is on by default";
                         }
-                        else {
-                         ok @warns == 0, "... and the warning is off by default";
+                        elsif (! (ok @warns == 0,
+                                     "... and the warning is off by default"))
+                        {
+                               diag("GOT\n" . join "\n", @warns);
                         }
                     }
                 }