perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: modperl-2.0/t/response/TestModperl merge.pm
Date Thu, 01 Apr 2004 18:53:12 GMT
geoff       2004/04/01 10:53:12

  Modified:    t/modperl merge3.t
               t/response/TestModperl merge.pm
  Added:       t/htdocs/merge3 htaccess
  Removed:     t/htdocs/merge2 htaccess
  Log:
  mark t/modperl/merge3.t as pending - PerlSetVar/PerlAddVar logic is still
  broken.  in the meanwhile, set up the test so we know how it should work
  
  Revision  Changes    Path
  1.1                  modperl-2.0/t/htdocs/merge3/htaccess
  
  Index: htaccess
  ===================================================================
  # htaccess file for t/response/TestModperl/merge.pm
  
  PerlSetEnv   MergeSetEnv3  SetEnv3Merge3Val
  PerlSetVar   MergeSetVar3  SetVar3Merge3Val
  PerlSetVar   MergeAddVar3  AddVar3Merge3Val1
  PerlAddVar   MergeAddVar3  AddVar3Merge3Val2
  
  
  
  1.2       +1 -1      modperl-2.0/t/modperl/merge3.t
  
  Index: merge3.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/modperl/merge3.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- merge3.t	12 Feb 2004 02:05:28 -0000	1.1
  +++ merge3.t	1 Apr 2004 18:53:11 -0000	1.2
  @@ -19,6 +19,6 @@
   #   PerlSetVar
   #   PerlAddVar
   
  -my $uri = "$base/merge2/merge3.html";
  +my $uri = "$base/merge3/";
   t_debug("connecting to $uri");
   print GET_BODY_ASSERT $uri;
  
  
  
  1.4       +27 -15    modperl-2.0/t/response/TestModperl/merge.pm
  
  Index: merge.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/merge.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- merge.pm	12 Feb 2004 20:32:56 -0000	1.3
  +++ merge.pm	1 Apr 2004 18:53:12 -0000	1.4
  @@ -65,10 +65,10 @@
                          PerlAddVar  => [MergeAddVar1 => ['AddVar1Val1', 
                                                           'AddVar1Val2']],
                        },
  -                2 => { PerlSetEnv  => [MergeSetEnv2 => 'SetEnv2Merge2Val'],
  -                       PerlSetVar  => [MergeSetVar2 => 'SetVar2Merge2Val'],
  -                       PerlAddVar  => [MergeAddVar2 => ['AddVar2Merge2Val1',
  -                                                        'AddVar2Merge2Val2']],
  +                2 => { PerlSetEnv  => [MergeSetEnv2 => 'SetEnv2Merge3Val'],
  +                       PerlSetVar  => [MergeSetVar2 => 'SetVar2Merge3Val'],
  +                       PerlAddVar  => [MergeAddVar2 => ['AddVar2Merge3Val1',
  +                                                        'AddVar2Merge3Val2']],
                        },
                   3 => { PerlSetEnv  => [MergeSetEnv3 => 'SetEnv3Merge3Val'],
                          PerlSetVar  => [MergeSetVar3 => 'SetVar3Merge3Val'],
  @@ -81,21 +81,24 @@
   
       my $r = shift;
   
  -    plan $r, tests => 10;
  -
       no strict qw(refs);
   
  -    my $location = $r->location;
  +    my $uri = $r->uri;
       my $hash;
   
  -    if ($location =~ m/(merge3)/) {
  +    if ($uri =~ m/(merge3)/) {
           $hash = $1;
  -    } elsif ($location =~ m/(merge2)/) {
  +
  +        # skip .htaccess merges for now - they are still broken
  +        plan tests => 10, under_construction;
  +    } elsif ($uri =~ m/(merge2)/) {
           $hash = $1;
       } else {
           $hash = 'merge1'; 
       }
   
  +    plan $r, tests => 10;
  +
       t_debug("testing against results in $hash");
   
       foreach my $level (sort keys %$hash) {
  @@ -139,13 +142,13 @@
           PerlSetVar   MergeAddVar1  AddVar1Val1
           PerlAddVar   MergeAddVar1  AddVar1Val2
   
  -        # these are overridden in /merge2 and /merge2/merge3.html
  +        # these are overridden in /merge2 and /merge3
           PerlSetEnv   MergeSetEnv2  SetEnv2Val
           PerlSetVar   MergeSetVar2  SetVar2Val
           PerlSetVar   MergeAddVar2  AddVar2Val1
           PerlAddVar   MergeAddVar2  AddVar2Val2
   
  -        # these are overridden in /merge2/merge3.html only
  +        # these are overridden in /merge3 only
           PerlSetEnv   MergeSetEnv3  SetEnv3Val
           PerlSetVar   MergeSetVar3  SetVar3Val
           PerlSetVar   MergeAddVar3  AddVar3Val1
  @@ -170,11 +173,20 @@
   
               # don't trigger htaccess files automatically
               AllowOverride none
  +        </Directory>
  +
  +        <Directory @DocumentRoot@/merge3>
  +            # overrides "2" values
  +            PerlSetEnv   MergeSetEnv2  SetEnv2Merge3Val
  +            PerlSetVar   MergeSetVar2  SetVar2Merge3Val
  +            PerlSetVar   MergeAddVar2  AddVar2Merge3Val1
  +            PerlAddVar   MergeAddVar2  AddVar2Merge3Val2
  +
  +            SetHandler perl-script
  +            PerlResponseHandler TestModperl::merge
   
  -            <Files merge3.html>
  -                # initiate a double merge with htaccess file
  -                AllowOverride all
  -            </Files>
  +            # override "3" values
  +            AllowOverride all
           </Directory>
   
       </VirtualHost>
  
  
  

Mime
View raw message