diff options
Diffstat (limited to 'dh_elpa_test')
-rwxr-xr-x | dh_elpa_test | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dh_elpa_test b/dh_elpa_test index 2b0074e..dab208c 100755 --- a/dh_elpa_test +++ b/dh_elpa_test @@ -89,7 +89,7 @@ B<dh_elpa_test> invokes Emacs to run ERT tests. =cut -use Text::Glob qw{ match_glob }; +use File::Find::Rule; use Array::Utils qw{ array_minus }; use Debian::Debhelper::Dh_Lib; @@ -126,16 +126,17 @@ if ($control->source->Build_Depends->has( "elpa-buttercup" )) { # ---- ERT -$Text::Glob::strict_wildcard_slash = 0; -my @ert_files = map { s|^\./||r } - split("\n", `grep -lr "ert-deftest" . --exclude-dir=.pc --exclude-dir=debian`); +my $rule = File::Find::Rule + ->file() + ->name( '*.el' ) + ->grep( "ert-deftest" ) + ->none( File::Find::Rule->name('debian/*'), File::Find::Rule->name('.pc/*') ); if (defined $ENV{'DH_ELPA_TEST_ERT_EXCLUDE'}) { foreach my $glob (split(',', $ENV{'DH_ELPA_TEST_ERT_EXCLUDE'})) { - if ( my @matches = match_glob( $glob, @ert_files ) ) { - @ert_files = array_minus( @ert_files, @matches ); - } + $rule->not_name($glob); } } +my @ert_files = $rule->in('.'); if (@ert_files) { my @args = qw{ emacs -batch -Q -l package }; |