Added manifest.t to test MANIFEST
Kartik Thakore [Sat, 15 Aug 2009 15:32:06 +0000 (11:32 -0400)]
t/manifest.t [new file with mode: 0644]

diff --git a/t/manifest.t b/t/manifest.t
new file mode 100644 (file)
index 0000000..b4cde68
--- /dev/null
@@ -0,0 +1,33 @@
+#!/usr/bin/perl\r
+\r
+# Test that our MANIFEST describes the distribution\r
+\r
+use strict;\r
+\r
+BEGIN {\r
+       use English qw(-no_match_vars);\r
+       $OUTPUT_AUTOFLUSH = 1;\r
+       $WARNING = 1;\r
+}\r
+\r
+my @MODULES = (\r
+       'Test::DistManifest 1.001003',\r
+);\r
+\r
+# Don't run tests for installs\r
+use Test::More;\r
+unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {\r
+       plan( skip_all => "Author tests not required for installation" );\r
+}\r
+\r
+# Load the testing modules\r
+foreach my $MODULE ( @MODULES ) {\r
+       eval "use $MODULE";\r
+       if ( $EVAL_ERROR ) {\r
+               $ENV{RELEASE_TESTING}\r
+               ? BAIL_OUT( "Failed to load required release-testing module $MODULE" )\r
+               : plan( skip_all => "$MODULE not available for testing" );\r
+       }\r
+}\r
+\r
+manifest_ok();\r