httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-test/perl-framework/t/apache getfile.t
Date Tue, 11 Dec 2001 05:12:08 GMT
dougm       01/12/10 21:12:08

  Modified:    perl-framework/t/apache getfile.t
  Log:
  switch to using Apache::TestCommon::run_files_test
  
  Revision  Changes    Path
  1.8       +4 -34     httpd-test/perl-framework/t/apache/getfile.t
  
  Index: getfile.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/getfile.t,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- getfile.t	2001/11/21 21:21:33	1.7
  +++ getfile.t	2001/12/11 05:12:08	1.8
  @@ -2,44 +2,14 @@
   use warnings FATAL => 'all';
   
   use Apache::Test;
  -use Apache::TestRequest ();
   use Apache::TestUtil;
  -use File::Basename;
  -
  -my $vars = Apache::Test::vars();
  -my $perlpod = $vars->{perlpod};
  -my @pods;
  -
  -if (-d $perlpod) {
  -    @pods = map { basename $_ } <$perlpod/*.pod>;
  -}
  -else {
  -    $perlpod = undef;
  -    #XXX: howto plan ..., skip_unless(...) + have_module(...) ?
  -    push @Apache::Test::SkipReasons,
  -      "dir $vars->{perlpod} doesn't exist"
  -}
  -
  -my %other_files = map {
  -    ("/getfiles-binary-$_", $vars->{$_})
  -} qw(httpd perl);
  -
  -plan tests => @pods + keys(%other_files), 'LWP';
  -
  -my $location = "/getfiles-perl-pod";
  -my $ua = Apache::TestRequest::user_agent();
  -
  -for my $file (@pods) {
  -    verify("$location/$file", "$perlpod/$file");
  -}
  +use Apache::TestRequest ();
  +use Apache::TestCommon ();
   
  -#XXX: should use lwp callback hook so we dont slurp 5M+ into memory
  -for my $url (sort keys %other_files) {
  -    verify($url, $other_files{$url});
  -}
  +Apache::TestCommon::run_files_test(\&verify);
   
   sub verify {
  -    my($url, $file) = @_;
  +    my($ua, $url, $file) = @_;
   
       my $flen = -s $file;
       my $received = 0;
  
  
  

Mime
View raw message