[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-test-cvs
Subject:    cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
From:       geoff () apache ! org
Date:       2004-04-28 18:03:41
Message-ID: 20040428180341.67496.qmail () minotaur ! apache ! org
[Download RAW message or body]

geoff       2004/04/28 11:03:41

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
  Log:
  change write_pm_test() so that it allows multi-level directories.
  
  for example:
  
    t/response/TestFoo/bar.pm     => t/foo/bar.t      # nothing changed
  
    t/response/TestFoo/Bar/baz.pm => t/foo/bar.t      # old behavior
    t/response/TestFoo/Bar/baz.pm => t/foo/bar/baz.t  # new behavior, DWIMmy
  
  Revision  Changes    Path
  1.89      +6 -4      httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm
  
  Index: TestConfigPerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- TestConfigPerl.pm	28 Apr 2004 14:55:42 -0000	1.88
  +++ TestConfigPerl.pm	28 Apr 2004 18:03:41 -0000	1.89
  @@ -128,9 +128,9 @@
   }
   
   sub write_pm_test {
  -    my($self, $module, $base, $sub) = @_;
  +    my($self, $module, $sub, @base) = @_;
   
  -    my $dir = catfile $self->{vars}->{t_dir}, $base;
  +    my $dir = catfile $self->{vars}->{t_dir}, @base;
       my $t = catfile $dir, "$sub.t";
       return if -e $t;
   
  @@ -501,9 +501,11 @@
   
           $self->run_apache_test_configure($file, $module, $status);
   
  -        my($base, $sub) =
  +        my @base =
               map { s/^test//i; $_ } split '::', $module;
   
  +        my $sub = pop @base;
  +
           my $hook = ($subdir eq 'Hooks' ? $hooks{$sub} : '')
               || $hooks{$subdir} || $subdir;
   
  @@ -544,7 +546,7 @@
               $self->postamble($self->$container($module), \@args) if @args;
           }
   
  -        $self->write_pm_test($module, lc $base, lc $sub);
  +        $self->write_pm_test($module, lc $sub, map { lc } @base);
       }
   }
   
  
  
  
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic