Return-Path: Delivered-To: apmail-httpd-apreq-cvs-archive@www.apache.org Received: (qmail 87106 invoked from network); 10 Mar 2007 18:54:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Mar 2007 18:54:23 -0000 Received: (qmail 82566 invoked by uid 500); 10 Mar 2007 18:54:32 -0000 Delivered-To: apmail-httpd-apreq-cvs-archive@httpd.apache.org Received: (qmail 82529 invoked by uid 500); 10 Mar 2007 18:54:32 -0000 Mailing-List: contact apreq-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: apreq-dev@httpd.apache.org List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list apreq-cvs@httpd.apache.org Received: (qmail 82518 invoked by uid 99); 10 Mar 2007 18:54:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Mar 2007 10:54:32 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Mar 2007 10:54:22 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id BDD4A1A9838; Sat, 10 Mar 2007 10:54:02 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r516765 - in /httpd/apreq/trunk/glue/perl/t/apreq: cgi.t upload.t Date: Sat, 10 Mar 2007 18:54:02 -0000 To: apreq-cvs@httpd.apache.org From: randyk@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070310185402.BDD4A1A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: randyk Date: Sat Mar 10 10:54:01 2007 New Revision: 516765 URL: http://svn.apache.org/viewvc?view=rev&rev=516765 Log: On Win32, the most recent ActivePerl switched the order of @INC, so that the the expected system pod files used in the upload tests are not in the pod directory that Apache::Test picks up. Instead, use files that are present in the pod directory that Apache::Test configures. Modified: httpd/apreq/trunk/glue/perl/t/apreq/cgi.t httpd/apreq/trunk/glue/perl/t/apreq/upload.t Modified: httpd/apreq/trunk/glue/perl/t/apreq/cgi.t URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/glue/perl/t/apreq/cgi.t?view=diff&rev=516765&r1=516764&r2=516765 ============================================================================== --- httpd/apreq/trunk/glue/perl/t/apreq/cgi.t (original) +++ httpd/apreq/trunk/glue/perl/t/apreq/cgi.t Sat Mar 10 10:54:01 2007 @@ -15,8 +15,20 @@ my @keys = ('a'..'z'); my $cwd = getcwd(); -my %types = (perl => 'application/octet-stream', - 'perltoc.pod' => 'text/x-pod'); + +my %types = (perl => 'application/octet-stream'); +my $vars = Apache::Test::vars; +my $perlpod = $vars->{perlpod}; +if (-d $perlpod) { + opendir(my $dh, $perlpod); + my @files = grep { /\.(pod|pm)$/ } readdir $dh; + closedir $dh; + if (scalar @files > 0) { + my $file = $files[0]; + $types{$file} = ($file =~ /\.pod$/) ? 'text/x-pod' : 'text/plain'; + } +} + my @names = sort keys %types; my @methods = sort qw/slurp fh tempname link io/; @@ -160,7 +172,7 @@ # file upload tests foreach my $name (@names) { - my $url = ( ($name =~ /\.pod$/) ? + my $url = ( ($name =~ /\.(pod|pm)$/) ? "getfiles-perl-pod/" : "/getfiles-binary-" ) . $name; my $content = GET_BODY_ASSERT($url); my $path = File::Spec->catfile($cwd, 't', $name); Modified: httpd/apreq/trunk/glue/perl/t/apreq/upload.t URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/glue/perl/t/apreq/upload.t?view=diff&rev=516765&r1=516764&r2=516765 ============================================================================== --- httpd/apreq/trunk/glue/perl/t/apreq/upload.t (original) +++ httpd/apreq/trunk/glue/perl/t/apreq/upload.t Sat Mar 10 10:54:01 2007 @@ -14,15 +14,28 @@ my %types = (perl => 'application/octet-stream', httpd => 'application/octet-stream', - 'perltoc.pod' => 'text/x-pod', - 'perlport.pod' => 'text/x-pod'); + ); +my $vars = Apache::Test::vars; +my $perlpod = $vars->{perlpod}; +if (-d $perlpod) { + opendir(my $dh, $perlpod); + my @files = grep { /\.(pod|pm)$/ } readdir $dh; + closedir $dh; + if (scalar @files > 1) { + for my $i (0 .. 1) { + my $file = $files[$i]; + $types{$file} = ($file =~ /\.pod$/) ? 'text/x-pod' : 'text/plain'; + } + } +} + my @names = sort keys %types; my @methods = sort qw/slurp fh tempname link io/; plan tests => @names * @methods, need_lwp; foreach my $name (@names) { - my $url = ( ($name =~ /\.pod$/) ? + my $url = ( ($name =~ /\.(pod|pm)$/) ? "getfiles-perl-pod/" : "/getfiles-binary-" ) . $name; my $content = GET_BODY_ASSERT($url); my $path = File::Spec->catfile($cwd, 't', $name);