Sfoglia il codice sorgente

Test::Dpkg: Refactor perl modules directory list into a new function

Guillem Jover 10 anni fa
parent
commit
6e3747138b
2 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. 1 0
      debian/changelog
  2. 7 1
      scripts/Test/Dpkg.pm

+ 1 - 0
debian/changelog

@@ -16,6 +16,7 @@ dpkg (1.18.10) UNRELEASED; urgency=medium
       Thanks to Mattia Rizzolo <mattia@debian.org>. Closes: #832179
     - Rename various private methods and functions with an underscore prefix
       and unified names.
+    - Refactor perl modules directory list into a new function in Test::Dpkg.
   * Documentation:
     - Document Testsuite-Triggers in dsc(5).
     - Fix deb-changes(5) description to talk about .changes instead of .dsc.

+ 7 - 1
scripts/Test/Dpkg.pm

@@ -21,6 +21,7 @@ use warnings;
 our $VERSION = '0.00';
 our @EXPORT_OK = qw(
     all_perl_files
+    test_get_perl_dirs
     test_needs_author
     test_needs_module
     test_needs_command
@@ -40,6 +41,11 @@ use File::Find;
 use IPC::Cmd qw(can_run);
 use Test::More;
 
+sub test_get_perl_dirs
+{
+    return qw(t src/t lib utils/t scripts dselect);
+}
+
 sub all_perl_files
 {
     my @files;
@@ -47,7 +53,7 @@ sub all_perl_files
         push @files, $File::Find::name if m/\.(pl|pm|t)$/;
     };
 
-    find($scan_perl_files, qw(t src/t lib utils/t scripts dselect));
+    find($scan_perl_files, test_get_perl_dirs());
 
     return @files;
 }