"Fossies" - the Fresh Open Source Software Archive

Member "perl-5.32.1/cpan/Compress-Raw-Bzip2/t/000prereq.t" (18 Dec 2020, 958 Bytes) of package /linux/misc/perl-5.32.1.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "000prereq.t": 5.35.10_vs_5.35.11.

    1 BEGIN {
    2     if ($ENV{PERL_CORE}) {
    3         chdir 't' if -d 't';
    4         @INC = ("../lib", "lib/compress");
    5     }
    6 }
    7 
    8 use lib qw(t t/compress);
    9 use strict ;
   10 use warnings ;
   11 
   12 use Test::More ;
   13 
   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 };
   20 
   21 
   22     my $VERSION = '2.093';
   23     my @NAMES = qw(
   24 			
   25 			);
   26 
   27     my @OPT = qw(
   28 			
   29 			);
   30 
   31     plan tests => 1 + @NAMES + @OPT + $extra ;
   32 
   33     ok 1;
   34 
   35     foreach my $name (@NAMES)
   36     {
   37         use_ok($name, $VERSION);
   38     }
   39 
   40 
   41     foreach my $name (@OPT)
   42     {
   43         eval " require $name " ;
   44         if ($@)
   45         {
   46             ok 1, "$name not available" 
   47         }
   48         else  
   49         {
   50             my $ver = eval("\$${name}::VERSION");
   51             is $ver, $VERSION, "$name version should be $VERSION" 
   52                 or diag "$name version is $ver, need $VERSION" ;
   53         }         
   54     }
   55     
   56 }
   57