Permalink
Browse files

added manifest test

  • Loading branch information...
1 parent 56305e9 commit f239c6d3439e4c6b88e5675a2569638a7e88b357 @sni committed May 4, 2012
Showing with 42 additions and 2 deletions.
  1. +1 −0 MANIFEST
  2. +1 −1 MYMETA.json
  3. +1 −1 MYMETA.yml
  4. +39 −0 t/93-manifest.t
View
@@ -39,6 +39,7 @@ t/34-timeperiods.t
t/35-Monitoring-Availability-nologs.t
t/92_clean_debug.t
t/92_todo.t
+t/93-manifest.t
t/97-Pod.t
t/98-Pod-Coverage.t
t/99-Perl-Critic.t
View
@@ -43,5 +43,5 @@
"http://dev.perl.org/licenses/"
]
},
- "version" : "0.30"
+ "version" : "0.32"
}
View
@@ -22,4 +22,4 @@ requires:
perl: 5.008
resources:
license: http://dev.perl.org/licenses/
-version: 0.30
+version: 0.32
View
@@ -0,0 +1,39 @@
+use strict;
+use warnings;
+use Test::More;
+use Data::Dumper;
+
+plan skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.' unless $ENV{TEST_AUTHOR};
+
+# first do a make distcheck
+open(my $ph, '-|', 'make distcheck 2>&1') or die('make failed: '.$!);
+while(<$ph>) {
+ my $line = $_;
+ chomp($line);
+
+ if( $line =~ m/\/bin\/perl/
+ or $line =~ m/: Entering directory/
+ or $line =~ m/: Leaving directory/
+ ) {
+ pass($line);
+ next;
+ }
+
+ fail($line);
+}
+close($ph);
+ok($? == 0, 'make exited with: '.$?);
+
+# read our manifest file
+my $manifest = {};
+open(my $fh, '<', 'MANIFEST') or die('open MANIFEST failed: '.$!);
+while(<$fh>) {
+ my $line = $_;
+ chomp($line);
+ next if $line =~ m/^#/;
+ $manifest->{$line} = 1;
+}
+close($fh);
+ok(scalar keys %{$manifest} > 0, 'read entrys from MANIFEST: '.(scalar keys %{$manifest}));
+
+done_testing();

0 comments on commit f239c6d

Please sign in to comment.