Просмотр исходного кода

test: Only scan perl module files that will ever contain POD markup

This should reduce the check time significantly, as it stops checking
the program files by duplicate (for <script> and <script>.pl), and does
not scan the .git directory any longer.
Guillem Jover лет назад: 13
Родитель
Сommit
e2ea33bdd0
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      test/000_pod.t

+ 10 - 2
test/000_pod.t

@@ -20,5 +20,13 @@ use Test::More;
 
 
 eval 'use Test::Pod 1.00';
 eval 'use Test::Pod 1.00';
 plan skip_all => 'Test::Pod 1.00 required for testing POD' if $@;
 plan skip_all => 'Test::Pod 1.00 required for testing POD' if $@;
-my @poddirs = ( $ENV{srcdir} || '.' );
-all_pod_files_ok( all_pod_files( @poddirs ) );
+
+if (defined $ENV{srcdir}) {
+    chdir $ENV{srcdir} or die "cannot chdir to source directory: $!";
+}
+
+my @dirs = qw(scripts/Dpkg);
+my @files = qw(scripts/Dpkg.pm);
+push @files, all_pod_files(@dirs);
+
+all_pod_files_ok(@files);