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