porting/podcheck.t: improve diagnostic
authorDavid Mitchell <davem@iabyn.com>
Thu, 9 May 2013 14:32:24 +0000 (15:32 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 9 May 2013 14:50:46 +0000 (15:50 +0100)
If a test fails because the number of warnings for a pod file was more
than expected, make it clear in the diag output that it was indeed
why it failed.

t/porting/podcheck.t

index f7e75cb..9864af6 100644 (file)
@@ -1804,9 +1804,10 @@ foreach my $filename (@files) {
                 # subtract back this number we previously added in.
                 $total_known -= $problem_count;
 
-                $diagnostic .= $indent . $message;
+                $diagnostic .= $indent . qq{"$message"};
                 if ($problem_count > 2) {
-                    $diagnostic .= "  ($problem_count occurrences)";
+                    $diagnostic .= "  ($problem_count occurrences,"
+                       . " expected $known_problems{$canonical}{$message})";
                 }
                 foreach my $problem (@{$problems{$filename}{$message}}) {
                     $diagnostic .= " " if $problem_count == 1;