Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 35281 invoked from network); 6 Aug 2004 03:20:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Aug 2004 03:20:02 -0000 Received: (qmail 10388 invoked by uid 500); 6 Aug 2004 03:20:02 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 10332 invoked by uid 500); 6 Aug 2004 03:20:01 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 10316 invoked by uid 99); 6 Aug 2004 03:20:01 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [142.132.65.108] (HELO theoryx5.uwinnipeg.ca) (142.132.65.108) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 05 Aug 2004 20:19:58 -0700 Received: from theoryx5.uwinnipeg.ca (localhost.localdomain [127.0.0.1]) by theoryx5.uwinnipeg.ca (8.12.8/8.12.8) with ESMTP id i763LGMv020705 for ; Thu, 5 Aug 2004 22:21:16 -0500 Received: from localhost (randy@localhost) by theoryx5.uwinnipeg.ca (8.12.8/8.12.8/Submit) with ESMTP id i763LFHE020701 for ; Thu, 5 Aug 2004 22:21:16 -0500 Date: Thu, 5 Aug 2004 22:21:15 -0500 (CDT) From: Randy Kobes To: apreq-dev@httpd.apache.org Subject: env/t/request.t on Win32 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N There's a couple of things about the env/t/request.t test that Win32 doesn't handle: - link() isn't available; - when comparing the output from the redirect tests involving index.txt, there's a \r that needs to be taken into account. This patch allows the tests to pass on Win32: ==================================================== Index: env/t/request.t =================================================================== RCS file: /home/cvs/httpd-apreq-2/env/t/request.t,v retrieving revision 1.12 diff -u -r1.12 request.t --- env/t/request.t 3 Aug 2004 05:06:04 -0000 1.12 +++ env/t/request.t 6 Aug 2004 03:14:13 -0000 @@ -62,14 +62,19 @@ # internal redirect to plain text files (which are non-apreq requests) my $index_html = do {local (@ARGV,$/) = "t/htdocs/index.html"; <> }; -link "t/htdocs/index.html", "t/htdocs/index.txt"; -ok t_cmp(GET_BODY("/apreq_redirect_test?test=redirect_index_txt_GET&location=/index.txt"), $index_html, - "redirect /index.txt (GET)"); +require File::Copy; +File::Copy::copy("t/htdocs/index.html", "t/htdocs/index.txt") + or die "Cannot copy t/htdocs/index.html to t/htdocs/index.txt: $!"; -ok t_cmp(POST_BODY("/apreq_redirect_test?test=redirect_index_txt_POST", - content => "quux=$filler;location=/index.txt;foo=$filler"), $index_html, +$body = GET_BODY("/apreq_redirect_test?test=redirect_index_txt_GET&location=/index.txt"); +$body =~ s{\r}{}g; +ok t_cmp($body, $index_html, + "redirect /index.txt (GET)"); +$body = POST_BODY("/apreq_redirect_test?test=redirect_index_txt_POST", + content => "quux=$filler;location=/index.txt;foo=$filler"); +$body =~ s{\r}{}g; +ok t_cmp($body, $index_html, "redirect /index.txt (POST)"); - # output filter tests ===================================================== I was wondering, in particular, if the copying of the file, rather than using link, affects the test? -- best regards, randy