[PATCH] *-Compress-* 2.020
[p5sagit/p5-mst-13.2.git] / ext / IO-Compress / t / 000prereq.t
CommitLineData
319fab50 1BEGIN {
2 if ($ENV{PERL_CORE}) {
3 chdir 't' if -d 't';
4 @INC = ("../lib", "lib/compress");
5 }
6}
7
8use lib qw(t t/compress);
9use strict ;
10use warnings ;
11
12use Test::More ;
13
14BEGIN
15{
16 # use Test::NoWarnings, if available
17 my $extra = 0 ;
18 $extra = 1
19 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
20
21
dcfdccf9 22 my $VERSION = '2.020';
319fab50 23 my @NAMES = qw(
24 Compress::Raw::Bzip2
25 Compress::Raw::Zlib
26 );
27
28 my @OPT = qw(
29
30 );
31
32 plan tests => @NAMES + @OPT + $extra ;
33
34 foreach my $name (@NAMES)
35 {
36 use_ok($name, $VERSION);
37 }
38
39
40 foreach my $name (@OPT)
41 {
42 eval " require $name " ;
43 if ($@)
44 {
45 ok 1, "$name not available"
46 }
47 else
48 {
49 my $ver = eval("\$${name}::VERSION");
50 is $ver, $VERSION, "$name version should be $VERSION"
51 or diag "$name version is $ver, need $VERSION" ;
52 }
53 }
54
55}
56