summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/01compile.t16
1 files changed, 10 insertions, 6 deletions
diff --git a/t/01compile.t b/t/01compile.t
index 2b81d0c3..727112a3 100644
--- a/t/01compile.t
+++ b/t/01compile.t
@@ -2,10 +2,14 @@
use strict;
use warnings;
-use Test::More tests => 26;
-for my $module (glob("urpm/*.pm")) {
- $module =~ s,/,::,g;
- $module =~ s,\.pm$,,;
- use_ok $module;
-}
+use English qw(-no_match_vars);
+use Test::More;
+
+eval {
+ require Test::Compile;
+ Test::Compile->import();
+};
+plan(skip_all => 'Test::Compile required') if $EVAL_ERROR;
+
+all_pm_files_ok(all_pm_files('urpm'));