--- Parse-BACKPAN-Packages-0.33/t/simple.t Sun Jun 8 10:36:40 2008
+++ Parse-BACKPAN-Packages-0.34/t/simple.t Fri Jul 11 17:13:09 2008
@@ -1,7 +1,7 @@
#!perl
use strict;
use warnings;
-use Test::More tests => 84;
+use Test::More tests => 55;
use lib 'lib';
use_ok("Parse::BACKPAN::Packages");
@@ -35,65 +35,42 @@
is($acme_colours[6]->version, "1.01");
is($acme_colours[7]->version, "1.02");
+# as the latest version may change at any time we only determine that the
+# latest distribution is at least the last know version.
+my $version = '1.04';
+my $latest = $acme_colours[-1]->version;
+like($latest, qr/^\d+\.\d+$/);
+cmp_ok($latest, '>=', $version);
+
is($acme_colours[-1]->cpanid, "LBROCARD");
-is($acme_colours[-1]->date, "1177770081");
+cmp_ok($acme_colours[-1]->date, '>=', "1177770081");
is($acme_colours[-1]->dist, "Acme-Colour");
-is($acme_colours[-1]->distvname, "Acme-Colour-1.04");
-is($acme_colours[-1]->filename, "Acme-Colour-1.04.tar.gz");
+is($acme_colours[-1]->distvname, "Acme-Colour-$latest");
+is($acme_colours[-1]->filename, "Acme-Colour-$latest.tar.gz");
is($acme_colours[-1]->maturity, "released");
-is($acme_colours[-1]->prefix, "authors/id/L/LB/LBROCARD/Acme-Colour-1.04.tar.gz");
-is($acme_colours[-1]->version, "1.04");
+is($acme_colours[-1]->prefix, "authors/id/L/LB/LBROCARD/Acme-Colour-$latest.tar.gz");
+# test a selection of owned distributions
my @acmes = $p->distributions_by('LBROCARD');
foreach my $dist (
'Acme-Colour',
'Buffy',
- 'CPAN-IndexPod',
- 'CPAN-Metadata-RDF',
- 'CPAN-Unpack',
- 'CPAN-WWW-Testers',
- 'CPAN-WWW-Testers-Generator',
- 'Data-Page',
- 'DateTime-Stringify',
'Devel-ebug',
'Functional',
'Games-GuessWord',
'GraphViz',
'HTML-Fraction',
'HTTP-Server-Simple-Kwiki',
- 'Haul',
- 'Image-Imlib2',
- 'Image-WorldMap',
- 'Java-JVM-Classfile',
- 'Language-Functional',
- 'MP3-ID3Lib',
- 'Mac-EyeTV',
- 'MealMaster',
- 'Messaging-Courier',
- 'Module-Packaged',
'Net-Amazon-AWIS',
'Net-Amazon-SimpleQueue',
'Net-DPAP-Client',
'Net-OpenDHT',
'OpenFrame-Segment-Apache',
'OpenFrame-Segment-Apache2',
- 'PPI-Metric-Basic',
- 'Parse-BACKPAN-Packages',
- 'Parse-CPAN-Authors',
- 'Parse-CPAN-Packages',
- 'Search-Mousse',
- 'String-Koremutake',
- 'Template-Plugin-Page',
- 'Test-Expect',
- 'Test-WWW-Mechanize-Catalyst',
- 'Tie-GHash',
- 'Tree-Ternary_XS',
'WWW-Gazetteer',
'WWW-Gazetteer-Calle',
'WWW-Gazetteer-FallingRain',
'WWW-Gazetteer-Getty',
- 'WWW-Mechanize-Timed',
- 'WWW-Search-Google',
'XML-asData',
) {
ok(scalar(grep { $_ eq $dist } @acmes), "LBROCARD has $dist");