httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigPHP.pm
Date Tue, 09 Nov 2004 04:24:34 GMT
geoff       2004/11/08 20:24:34

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfigPHP.pm
  Log:
  skip_all addition to plan()
  
  Revision  Changes    Path
  1.11      +17 -14    httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPHP.pm
  
  Index: TestConfigPHP.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPHP.pm,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestConfigPHP.pm	5 Nov 2004 05:08:11 -0000	1.10
  +++ TestConfigPHP.pm	9 Nov 2004 04:24:33 -0000	1.11
  @@ -53,14 +53,14 @@
       php     => sub { join '', "<?php\n", grep {s/^/# /gm} @_ },
       default => sub { join '', grep {s/^/\# /gm} @_ },
   );
  -                                                                                      
                                      
  +
   my %file_ext = (
       map({$_ => 'html'} qw(htm html)),
       map({$_ => 'c'   } qw(c h)),
       map({$_ => 'ini' } qw(ini)),
       map({$_ => 'php' } qw(php)),
   );
  -                                                                                      
                                      
  +
   sub warn_style_sub_ref {
       my ($self, $filename) = @_;
       my $ext = $self->filename_ext($filename);
  @@ -231,7 +231,7 @@
   html_errors = Off
   @error_log@
   output_buffering = Off
  -                                                                                      
                                      
  +
   ; the rest of php.ini-recommended, unaltered, save for
   ; some tidying like the removal of comments and blank lines
   
  @@ -463,15 +463,13 @@
   $_no_plan = false;
   $_num_failures = 0;
   $_num_skips = 0;
  -$_skip_all = false;
  -$_skip_reason = '';
   $_test_num = 0;
   
   function plan($plan)
   {
       # plan('no_plan');
       # plan('skip_all');
  -    # plan('skip_all' => 'My reason is...');
  +    # plan(array('skip_all' => 'My reason is...'));
       # plan(23);
   
       global $_no_plan;
  @@ -483,14 +481,19 @@
           case 'no_plan':
               $_no_plan = true;
               break;
  +
           case 'skip_all':
  -            $_skip_all = true;
  -            break;
  -        case 'Array':
  -            $_skip_all = true;
  -            $_skip_reason = $plan['skip_all'];
  +            echo "1..0\n";
  +            exit;
               break;
  +
           default:
  +            if (is_array($plan))
  +            {
  +                echo "1..0 # Skip {$plan['skip_all']}\n";
  +                exit;
  +            }
  +
               echo "1..$plan\n";
               break;
       }
  @@ -558,7 +561,7 @@
   
       return $pass;
   }
  - 
  +
   function isnt($this, $that, $test_name = '')
   {
       $pass = ($this != $that);
  @@ -692,7 +695,7 @@
           echo "# $message\n";
       }
   }
  - 
  +
   function include_ok($module)
   {
       $pass = ((include $module) == 'OK');
  @@ -746,7 +749,7 @@
   # function eq_set()
   # {
   # }
  - 
  +
   function _test_end()
   {
       global $_no_plan;
  
  
  

Mime
View raw message