File: 00-version.t

package info (click to toggle)
libnet-dns-perl 0.63-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 836 kB
  • ctags: 425
  • sloc: perl: 6,796; sh: 109; ansic: 104; makefile: 59
file content (34 lines) | stat: -rw-r--r-- 798 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# $Id: 00-version.t 685 2007-10-10 13:54:34Z olaf $ -*-perl-*-

use Test::More;
use File::Spec;
use File::Find;
use ExtUtils::MakeMaker;
use strict;

my @files;
my $blib = File::Spec->catfile(qw(blib lib));
	
find( sub { push(@files, $File::Find::name) if /\.pm$/}, $blib);

plan skip_all => 'No versions from git checkouts' if -e '.git';


my $can = eval { MM->can('parse_version') };

if (!$@ and $can) {
	plan tests => (2* scalar @files) - 1;
} else {
	plan skip_all => ' Not sure how to parse versions.';
}

foreach my $file (@files) {
	my $version = MM->parse_version($file);
	diag("$file\t=>\t$version") if $ENV{'NET_DNS_DEBUG'};
	isnt("$file: $version", "$file: undef", "$file has a version");
	next if $file =~ /Net\/DNS.pm$/;
	ok ($version>290,"$file: version has reasonable value");
}