[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-Porters] [PATCH: 5.6.0]regression test patches for :t:comp: folder




Hi,

I found that my miniperl was able to get through all of :t:cmd:*.t
with no modifications.  However :comp: was another matter - and in fact
I am still not happy with the results for tests (such as cpp.t) that
invoke perl via C<system()> or backticks.  It is possible to have
perl be a served tool is it not?  If so then the passage of the relevant
tests would depend on installing perl as a tool before the tests can
pass - something that apparently plagues a part of the tests on Win32.

At any rate this patch ough to get you through most of :comp: with the
possible exception of cpp.t:

diff -ru :comp.orig:colon.t :comp:colon.t
--- :comp.orig:colon.t	Tue Jul 20 17:18:11 1999
+++ :comp:colon.t	Sun May 14 10:39:12 2000
@@ -9,7 +9,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+	if ($^O eq 'MacOS') {
+        unshift @INC, '::lib:';
+	}
+	else {
+        unshift @INC, '../lib';	
+	}
 }
 
 use strict;
diff -ru :comp.orig:cpp.t :comp:cpp.t
--- :comp.orig:cpp.t	Tue Jul 20 17:18:11 1999
+++ :comp:cpp.t	Sun May 14 17:06:58 2000
@@ -4,7 +4,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+	if ($^O eq 'MacOS') {
+        unshift @INC, '::lib:';
+	}
+	else {
+	    unshift @INC, '../lib';
+	}
 }
 
 use Config;
@@ -15,4 +20,9 @@
     exit; 		# Cannot test till after install, alas.
 }
 
-system "./perl -P comp/cpp.aux"
+if ($^O eq 'MacOS') {
+    system "$^X -P :comp:cpp.aux"
+}
+else {
+    system "./perl -P comp/cpp.aux"
+}
diff -ru :comp.orig:multiline.t :comp:multiline.t
--- :comp.orig:multiline.t	Tue Jul 20 17:18:11 1999
+++ :comp:multiline.t	Sun May 14 10:55:04 2000
@@ -36,7 +36,10 @@
 
 if ($count == 7) {print "ok 3\n";} else {print "not ok 3\n";}
 
-$_ = ($^O eq 'MSWin32') ? `type Comp.try` : `cat Comp.try`;
+my $cat = 'cat';
+if ($^O eq 'MacOS') { $cat = 'Catenate' }
+    
+$_ = ($^O eq 'MSWin32') ? `type Comp.try` : `$cat Comp.try`;
 
 if (/.*\n.*\n.*\n$/) {print "ok 4\n";} else {print "not ok 4\n";}
 
diff -ru :comp.orig:proto.t :comp:proto.t
--- :comp.orig:proto.t	Sun Mar  5 19:16:14 2000
+++ :comp:proto.t	Sun May 14 16:29:57 2000
@@ -11,7 +11,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+	if ($^O eq 'MacOS') {
+        unshift @INC, '::lib:';
+	}
+	else {
+	    unshift @INC, '../lib';
+	}
 }
 
 use strict;
diff -ru :comp.orig:require.t :comp:require.t
--- :comp.orig:require.t	Wed Mar  8 18:34:41 2000
+++ :comp:require.t	Sun May 14 16:35:35 2000
@@ -2,7 +2,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, ('.', '../lib');
+	if ($^O eq 'MacOS') {
+        unshift @INC, ('.', '::lib:');
+	}
+	else {
+	    unshift @INC, ('.', '../lib');
+	}
 }
 
 # don't make this lexical
diff -ru :comp.orig:script.t :comp:script.t
--- :comp.orig:script.t	Mon Feb 28 06:58:49 2000
+++ :comp:script.t	Sun May 14 16:59:03 2000
@@ -2,7 +2,13 @@
 
 # $RCSfile: script.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:23 $
 
-print "1..3\n";
+if ($^O eq 'MacOS') {
+    print "1..0\n";
+    exit;
+}
+else {
+    print "1..3\n";
+}
 
 $PERL = ($^O eq 'MSWin32') ? '.\perl' : './perl';
 $x = `$PERL -le "print 'ok';"`;
diff -ru :comp.orig:use.t :comp:use.t
--- :comp.orig:use.t	Tue Mar 21 05:46:09 2000
+++ :comp:use.t	Sun May 14 16:47:50 2000
@@ -2,7 +2,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+	if ($^O eq 'MacOS') {
+        unshift @INC, '::lib:';
+	}
+	else {
+	    unshift @INC, '../lib';
+	}
 }
 
 print "1..27\n";
End of Patch.

BTW I am collecting these patches in:

   http://www.best.com/~pvhp/mac/macperl5.6.0/*.patch

Have fun.

Peter Prymmer




==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-porters-request@macperl.org