[Bps-public-commit] r12950 - in Shipwright/trunk: t

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Jun 6 00:25:07 EDT 2008


Author: sunnavy
Date: Fri Jun  6 00:25:03 2008
New Revision: 12950

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/t/00.load.t

Log:
 r13007 at sunnavys-mb:  sunnavy | 2008-06-06 12:24:23 +0800
 changed t/00load.t to read from MANIFST


Modified: Shipwright/trunk/t/00.load.t
==============================================================================
--- Shipwright/trunk/t/00.load.t	(original)
+++ Shipwright/trunk/t/00.load.t	Fri Jun  6 00:25:03 2008
@@ -1,33 +1,18 @@
-use Test::More tests => 27;
-
-BEGIN {
-    use_ok('Shipwright');
-    use_ok('Shipwright::Build');
-    use_ok('Shipwright::Backend');
-    use_ok('Shipwright::Backend::SVK');
-    use_ok('Shipwright::Backend::SVN');
-    use_ok('Shipwright::Logger');
-    use_ok('Shipwright::Manual');
-    use_ok('Shipwright::Source');
-    use_ok('Shipwright::Source::Base');
-    use_ok('Shipwright::Source::Compressed');
-    use_ok('Shipwright::Source::CPAN');
-    use_ok('Shipwright::Source::Directory');
-    use_ok('Shipwright::Source::HTTP');
-    use_ok('Shipwright::Source::FTP');
-    use_ok('Shipwright::Source::SVK');
-    use_ok('Shipwright::Source::SVN');
-    use_ok('Shipwright::Script');
-    use_ok('Shipwright::Script::Build');
-    use_ok('Shipwright::Script::Flags');
-    use_ok('Shipwright::Script::Import');
-    use_ok('Shipwright::Script::Initialize');
-    use_ok('Shipwright::Script::Help');
-    use_ok('Shipwright::Script::Maintain');
-    use_ok('Shipwright::Script::Update');
-    use_ok('Shipwright::Script::Delete');
-    use_ok('Shipwright::Test');
-    use_ok('Shipwright::Util');
-}
+use Test::More;
+use File::Spec;
+use File::Basename qw( dirname );
 
+my $manifest = File::Spec->catdir( dirname(__FILE__), '..', 'MANIFEST' );
 diag("Testing Shipwright $Shipwright::VERSION");
+plan skip_all => 'MANIFEST does not exist' unless -e $manifest;
+open FH, '<', $manifest;
+
+my @pms = map { s|^lib/||; chomp; $_ } grep { m|^lib/.*pm$| } <FH>;
+
+plan tests => scalar @pms;
+for my $pm (@pms) {
+    $pm =~ s|\.pm$||;
+    $pm =~ s|/|::|g;
+
+    use_ok ($pm);
+}



More information about the Bps-public-commit mailing list