perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject [mp2] t/hooks/cleanup2.t on Win32
Date Thu, 05 Jun 2003 16:09:53 GMT
Hi,
   The t/hooks/cleanup2.t test in mp2 uses an explicit
value for the size of a file, which isn't the right value
for Win32, due to crlf differences. This diff:
==========================================================
Index: cleanup2.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/cleanup2.t,v
retrieving revision 1.1
diff -u -r1.1 cleanup2.t
--- cleanup2.t	30 May 2003 02:09:57 -0000	1.1
+++ cleanup2.t	5 Jun 2003 16:17:40 -0000
@@ -4,6 +4,7 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
+require Apache::TestConfig;

 use File::Spec::Functions qw(catfile catdir);

@@ -33,9 +34,13 @@
     # since Apache destroys the request rec after the logging has been
     # finished, we have to give it some time  to get there
     # and remove in the file. (wait 0.25 .. 5 sec)
-    my $t = 0;
+    my $t = 0;
+    my $s = 0;
+    if (-e $file) {
+        $s = Apache::TestConfig::WIN32 ? 14 : 10;
+    }
     select undef, undef, undef, 0.25
-        while -e $file && -s _ == 10 || $t++ == 20;
+        while -e $file && -s _ == $s || $t++ == 20;

     if (-e $file) {
         t_debug("$file wasn't removed by the cleanup phase");
=================================================================
allows the test to pass.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message