stas 2003/09/19 12:54:37
Modified: t/response/TestAPR perlio.pm Log: skip the dup file sub-test if win32 and httpd < 2.0.48 Revision Changes Path 1.25 +14 -7 modperl-2.0/t/response/TestAPR/perlio.pm Index: perlio.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -u -u -r1.24 -r1.25 --- perlio.pm 4 Sep 2003 04:34:05 -0000 1.24 +++ perlio.pm 19 Sep 2003 19:54:37 -0000 1.25 @@ -19,13 +19,18 @@ #XXX: you can set to zero if largefile support is not enabled in Perl use constant LARGE_FILES_CONFLICT => 1; +# apr_file_dup has a bug on win32, +# should be fixed in apr 0.9.4 / httpd-2.0.48 +require Apache::Build; +use constant APR_WIN32_FILE_DUP_BUG => + Apache::Build::WIN32() && !have_min_apache_version('2.0.48'); + sub handler { my $r = shift; - my $tests = 12; - my $lfs_tests = 3; - - $tests += $lfs_tests unless LARGE_FILES_CONFLICT; + my $tests = 11; + $tests += 3 unless LARGE_FILES_CONFLICT; + $tests += 1 unless APR_WIN32_FILE_DUP_BUG; require APR::PerlIO; plan $r, tests => $tests, @@ -180,9 +185,11 @@ my $received = <$dup_fh>; close $dup_fh; - ok t_cmp($expected, - $received, - "read/write a dupped file"); + unless (APR_WIN32_FILE_DUP_BUG) { + ok t_cmp($expected, + $received, + "read/write a dupped file"); + } } # unbuffered write