]> git.imager.perl.org - imager.git/blobdiff - t/t93podcover.t
added cleanup, documentation, further tests and grayscale support
[imager.git] / t / t93podcover.t
index d12d02cbd1ea5bf3633cd9ab99d8215e4a8cb78e..2ff91d84b88a4ac2ef2e3f7eabc9a1e66f0a146a 100644 (file)
@@ -25,7 +25,7 @@ my @private =
   );
 my @trustme = ( '^open$',  );
 
-plan tests => 17;
+plan tests => 18;
 
 {
   pod_coverage_ok('Imager', { also_private => \@private,
@@ -66,12 +66,15 @@ plan tests => 17;
     last if /^=head1 METHOD INDEX/;
   }
   my @indexed;
+  my @unknown_indexed;
   while (<IMAGER>) {
     last if /^=\w/;
 
     if (/^(\w+)\(/) {
       push @indexed, $1;
-      delete $methods{$1};
+      unless (delete $methods{$1}) {
+       push @unknown_indexed, $1;
+      }
     }
   }
 
@@ -79,6 +82,10 @@ plan tests => 17;
     print "# the following methods are documented but not in the index:\n";
     print "#  $_\n" for sort keys %methods;
   }
+  unless (is(@unknown_indexed, 0, "only methods in method index")) {
+    print "# the following names are in the method index but not documented\n";
+    print "#  $_\n" for sort @unknown_indexed;
+  }
 
   sub dict_cmp_func;
   is_deeply(\@indexed, [ sort dict_cmp_func @indexed ],