Commit | Line | Data |
---|---|---|
16816334 | 1 | BEGIN { |
d695c1a1 | 2 | if ($ENV{PERL_CORE}) { |
16816334 | 3 | chdir 't' if -d 't'; |
1a6a8453 | 4 | @INC = ("../lib", "lib/compress"); |
16816334 | 5 | } |
6 | } | |
f4c6fd49 | 7 | |
642e522c | 8 | use lib 't'; |
f4c6fd49 | 9 | use strict ; |
8aa25532 | 10 | use warnings ; |
f4c6fd49 | 11 | |
642e522c | 12 | use Test::More ; |
f4c6fd49 | 13 | |
642e522c | 14 | BEGIN |
15 | { | |
16 | # use Test::NoWarnings, if available | |
17 | my $extra = 0 ; | |
18 | $extra = 1 | |
19 | if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; | |
f4c6fd49 | 20 | |
642e522c | 21 | plan tests => 2 + $extra ; |
f4c6fd49 | 22 | |
642e522c | 23 | use_ok('Compress::Zlib', 2) ; |
f4c6fd49 | 24 | } |
25 | ||
f4c6fd49 | 26 | # Check zlib_version and ZLIB_VERSION are the same. |
642e522c | 27 | |
f4c6fd49 | 28 | my $zlib_h = ZLIB_VERSION ; |
29 | my $libz = Compress::Zlib::zlib_version; | |
642e522c | 30 | |
31 | is($zlib_h, $libz, "ZLIB_VERSION ($zlib_h) matches Compress::Zlib::zlib_version") | |
32 | or diag <<EOM; | |
33 | ||
34 | The version of zlib.h does not match the version of libz | |
35 | ||
36 | You have zlib.h version $zlib_h | |
37 | and libz version $libz | |
38 | ||
39 | You probably have two versions of zlib installed on your system. | |
40 | Try removing the one you don't want to use and rebuild. | |
f4c6fd49 | 41 | EOM |
42 |