Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test suite updates

  • Loading branch information...
commit c6a3dfbc80bd125f7486a2200d115e000104623b 1 parent 8e5680d
@barbie authored
View
2  t/12generate.t
@@ -35,7 +35,7 @@ BEGIN {
eval {
$meta = CPAN::Testers::Metabase::AWS->new(
bucket => 'cpantesters',
- namespace => 'beta2',
+ namespace => 'beta4',
);
};
diag('No AWS key') unless($meta);
View
3  t/91podcover.t
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
# Skip if doing a regular install
View
20 t/94metatest.t
@@ -1,24 +1,28 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
# Skip if doing a regular install
plan skip_all => "Author tests not required for installation"
unless ( $ENV{AUTOMATED_TESTING} );
-eval "use Test::CPAN::Meta 0.13";
-plan skip_all => "Test::CPAN::Meta 0.13 required for testing META.yml" if $@;
+eval "use Test::CPAN::Meta";
+plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
-plan no_plan;
+plan 'no_plan';
-my $yaml = meta_spec_ok(undef,undef,@_);
+my $meta = meta_spec_ok(undef,undef,@_);
use CPAN::Testers::Data::Generator;
+my $version = $CPAN::Testers::Data::Generator::VERSION;
-is($yaml->{version},$CPAN::Testers::Data::Generator::VERSION,
+is($meta->{version},$version,
'META.yml distribution version matches');
-if($yaml->{provides}) {
- for my $mod (keys %{$yaml->{provides}}) {
- is($yaml->{provides}{$mod}{version},$CPAN::Testers::Data::Generator::VERSION,
+if($meta->{provides}) {
+ for my $mod (keys %{$meta->{provides}}) {
+ is($meta->{provides}{$mod}{version},$version,
"META.yml entry [$mod] version matches");
}
}
View
31 t/95changedate.t
@@ -1,24 +1,39 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
use IO::File;
-use CPAN::Testers::Data::Generator;
# Skip if doing a regular install
plan skip_all => "Author tests not required for installation"
unless ( $ENV{AUTOMATED_TESTING} );
-my $fh = IO::File->new('CHANGES','r') or plan skip_all => "Cannot open Changes file";
+my $fh = IO::File->new('Changes','r') or plan skip_all => "Cannot open Changes file";
-plan no_plan;
+plan 'no_plan';
+
+use CPAN::Testers::Data::Generator;
+my $version = $CPAN::Testers::Data::Generator::VERSION;
my $latest = 0;
while(<$fh>) {
next unless(m!^\d!);
- $latest = 1 if(m!^$CPAN::Testers::Data::Generator::VERSION!);
- like($_, qr!\d[\d._]+\s+(\d{2}/\d{2}/\d{4}|\w{3}\s+\w{3}\s+\d{1,2}\s+\d{2}:\d{2}:\d{2}\s+\w+\s+\d{4})!,'... version has a date');
+ $latest = 1 if(m!^$version!);
+
+ # 2012-08-26T01:02 or 2012-08-26T01:02:03 or 2012-08-26T01:02:03.04 or 2012-08-26T01:02+01:00
- # date formats allowed:
- # - 07/06/2009
- # - Thu Jul 31 23:09:25 BST 2003
+ like($_, qr! \d[\d._]+\s+ # version
+ ( \d{4}-\d{2}-\d{2} # 2012-08-26 - YYYY-MM-DD
+ ( T\d{2}:\d{2} # T01:02 - Thh:mm
+ ( :\d{2} # :02 - :ss
+ ( \.\d+ # .2 - .ss (microseconds)
+ )?
+ )?
+ ( (Z|[-+]\d+:\d+) # +01:00 - timezone
+ )?
+ )?
+ )
+ !x,'... version has a date');
}
is($latest,1,'... latest version not listed');
View
9 t/96metatest.t
@@ -1,13 +1,16 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
# Skip if doing a regular install
plan skip_all => "Author tests not required for installation"
unless ( $ENV{AUTOMATED_TESTING} );
-eval "use Test::JSON::Meta";
-plan skip_all => "Test::JSON::Meta required for testing META.json files" if $@;
+eval "use Test::CPAN::Meta::JSON";
+plan skip_all => "Test::CPAN::Meta::JSON required for testing META.json files" if $@;
-plan no_plan;
+plan 'no_plan';
my $meta = meta_spec_ok(undef,undef,@_);
Please sign in to comment.
Something went wrong with that request. Please try again.