diff options
Diffstat (limited to 'cpan/IO-Compress/t/111const-deflate.t')
-rw-r--r-- | cpan/IO-Compress/t/111const-deflate.t | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/cpan/IO-Compress/t/111const-deflate.t b/cpan/IO-Compress/t/111const-deflate.t index 82a4414149..bdb2eca0f7 100644 --- a/cpan/IO-Compress/t/111const-deflate.t +++ b/cpan/IO-Compress/t/111const-deflate.t @@ -26,75 +26,74 @@ BEGIN { { use Compress::Raw::Zlib ; - + my %all; for my $symbol (@Compress::Raw::Zlib::DEFLATE_CONSTANTS) { eval "defined Compress::Raw::Zlib::$symbol" ; $all{$symbol} = ! $@ ; - } - + } + my $pkg = 1; - - for my $module ( qw( Adapter::Deflate RawDeflate Deflate Gzip Zip )) + + for my $module ( qw( Adapter::Deflate RawDeflate Deflate Gzip Zip )) { - ++ $pkg ; + ++ $pkg ; eval <<EOM; package P$pkg; use Test::More ; use CompTestUtils; - + use IO::Compress::$module () ; - - ::title "IO::Compress::$module - no import" ; + + ::title "IO::Compress::$module - no import" ; EOM is $@, "", "create package P$pkg"; for my $symbol (@Compress::Raw::Zlib::DEFLATE_CONSTANTS) { if ( $all{$symbol}) { - eval "package P$pkg; defined IO::Compress::${module}::$symbol ;"; + eval "package P$pkg; defined IO::Compress::${module}::$symbol ;"; is $@, "", " has $symbol"; } else { ok 1, " $symbol not available"; } - } - } - - for my $module ( qw( Adapter::Deflate RawDeflate Deflate Gzip Zip )) + } + } + + for my $module ( qw( Adapter::Deflate RawDeflate Deflate Gzip Zip )) { for my $label (keys %Compress::Raw::Zlib::DEFLATE_CONSTANTS) { - ++ $pkg ; + ++ $pkg ; eval <<EOM; package P$pkg; use Test::More ; use CompTestUtils; - + use IO::Compress::$module qw(:$label) ; - - ::title "IO::Compress::$module - import :$label" ; - + + ::title "IO::Compress::$module - import :$label" ; + EOM is $@, "", "create package P$pkg"; - + for my $symbol (@{ $Compress::Raw::Zlib::DEFLATE_CONSTANTS{$label} } ) { if ( $all{$symbol}) { - eval "package P$pkg; defined $symbol ;"; + eval "package P$pkg; defined $symbol ;"; is $@, "", " has $symbol"; } else { ok 1, " $symbol not available"; - } - } - } - } - -} + } + } + } + } +} |