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

[MacPerl-Porters] [PATCH 5.6.0] tests in :t:lib:{q-z}*.t




Enclosed is a patch for MacOS-ifying the remaining tests in :t:lib:{q-z}*.t.
Not all patched tests should be expected to pass.  In particular I see these
failures (more seek trouble?) on:

miniperl :lib:tie-stdhandle.t
1..13
ok 1
ok 2
ok 3
ok 4
not ok 5
ok 6
ok 7
not ok 8
not ok 9
'' not ok 10
not ok 11
ok 12
ok 13

There is also these timelocal test failures, I am still not well versed
enough in the Mac time differences (I know about 0-.1904 and that is
about it):

miniperl :lib:timelocal.t
1..17
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
Can't handle date (59, 59, 23, 31, 11, -1) at :lib:timelocal.t line 32

At any rate here is the patch:


diff -ru :lib.n-p:safe1.t :lib:safe1.t
--- :lib.n-p:safe1.t	Tue Jul 20 17:18:13 1999
+++ :lib:safe1.t	Fri May 26 18:33:48 2000
@@ -2,7 +2,7 @@
 $|=1;
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
     require Config; import Config;
     if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
         print "1..0\n";
diff -ru :lib.n-p:safe2.t :lib:safe2.t
--- :lib.n-p:safe2.t	Sat Feb 19 04:18:07 2000
+++ :lib:safe2.t	Fri May 26 18:35:03 2000
@@ -2,7 +2,7 @@
 $|=1;
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
     require Config; import Config;
     if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
         print "1..0\n";
diff -ru :lib.n-p:sdbm.t :lib:sdbm.t
--- :lib.n-p:sdbm.t	Tue Jul 20 17:18:13 1999
+++ :lib:sdbm.t	Fri May 26 18:35:58 2000
@@ -4,7 +4,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
     require Config; import Config;
     if (($Config{'extensions'} !~ /\bSDBM_File\b/) && ($^O ne 'VMS')){
 	print "1..0\n";
diff -ru :lib.n-p:searchdict.t :lib:searchdict.t
--- :lib.n-p:searchdict.t	Tue Jul 20 17:18:13 1999
+++ :lib:searchdict.t	Fri May 26 18:37:19 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 print "1..4\n";
diff -ru :lib.n-p:selectsaver.t :lib:selectsaver.t
--- :lib.n-p:selectsaver.t	Tue Jul 20 17:18:13 1999
+++ :lib:selectsaver.t	Sat May 27 08:51:47 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 print "1..3\n";
diff -ru :lib.n-p:socket.t :lib:socket.t
--- :lib.n-p:socket.t	Mon Mar 13 10:32:18 2000
+++ :lib:socket.t	Sat May 27 08:55:11 2000
@@ -2,7 +2,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib' if -d '../lib';
+	if ($^O eq 'MacOS') {
+        unshift @INC, '::lib:' if -d '::lib:';
+	}
+	else {
+        unshift @INC, '../lib' if -d '../lib';
+	}
     require Config; import Config;
     if ($Config{'extensions'} !~ /\bSocket\b/ && 
         !(($^O eq 'VMS') && $Config{d_socket})) {
diff -ru :lib.n-p:soundex.t :lib:soundex.t
--- :lib.n-p:soundex.t	Tue Jul 20 17:18:13 1999
+++ :lib:soundex.t	Sat May 27 08:56:46 2000
@@ -18,7 +18,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 use Text::Soundex;
diff -ru :lib.n-p:symbol.t :lib:symbol.t
--- :lib.n-p:symbol.t	Tue Jul 20 17:18:13 1999
+++ :lib:symbol.t	Sat May 27 08:57:39 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 print "1..8\n";
diff -ru :lib.n-p:syslfs.t :lib:syslfs.t
--- :lib.n-p:syslfs.t	Thu Mar  2 18:12:26 2000
+++ :lib:syslfs.t	Sat May 27 08:58:41 2000
@@ -4,7 +4,7 @@
 
 BEGIN {
 	chdir 't' if -d 't';
-	unshift @INC, '../lib';
+	unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 	require Config; import Config;
 	# Don't bother if there are no quad offsets.
 	if ($Config{lseeksize} < 8) {
diff -ru :lib.n-p:textfill.t :lib:textfill.t
--- :lib.n-p:textfill.t	Tue Jul 20 17:18:13 1999
+++ :lib:textfill.t	Sat May 27 08:59:51 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 use Text::Wrap qw(&fill);
diff -ru :lib.n-p:texttabs.t :lib:texttabs.t
--- :lib.n-p:texttabs.t	Tue Jul 20 17:18:13 1999
+++ :lib:texttabs.t	Sat May 27 09:02:55 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 print "1..3\n";
diff -ru :lib.n-p:textwrap.t :lib:textwrap.t
--- :lib.n-p:textwrap.t	Tue Jul 20 17:18:13 1999
+++ :lib:textwrap.t	Sat May 27 09:04:12 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 use Text::Wrap qw(&wrap);
 
diff -ru :lib.n-p:thr5005.t :lib:thr5005.t
--- :lib.n-p:thr5005.t	Wed Mar 22 14:43:18 2000
+++ :lib:thr5005.t	Sat May 27 09:05:02 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
     require Config; import Config;
     if (! $Config{'use5005threads'}) {
 	print "1..0 # Skip: not use5005threads\n";
diff -ru :lib.n-p:tie-push.t :lib:tie-push.t
--- :lib.n-p:tie-push.t	Tue Jul 20 17:18:13 1999
+++ :lib:tie-push.t	Sat May 27 09:55:47 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }    
 
 {
@@ -21,4 +21,9 @@
 tie @get,Basic;
 tie @got,Basic;
 tie @tests,Basic;
-require "op/push.t"
+if ($^O eq 'MacOS') {
+    require ":op:push.t";
+}
+else {
+    require "op/push.t"
+}
diff -ru :lib.n-p:tie-stdarray.t :lib:tie-stdarray.t
--- :lib.n-p:tie-stdarray.t	Tue Jul 20 17:18:13 1999
+++ :lib:tie-stdarray.t	Sat May 27 09:58:19 2000
@@ -2,11 +2,16 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 use Tie::Array;
 tie @foo,Tie::StdArray;
 tie @ary,Tie::StdArray;
 tie @bar,Tie::StdArray;
-require "op/array.t"
+if ($^O eq 'MacOS') {
+    require ":op:array.t"
+}
+else {
+    require "op/array.t"
+}
diff -ru :lib.n-p:tie-stdhandle.t :lib:tie-stdhandle.t
--- :lib.n-p:tie-stdhandle.t	Mon Mar 13 10:32:18 2000
+++ :lib:tie-stdhandle.t	Sat May 27 09:59:42 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 use Tie::Handle;
diff -ru :lib.n-p:tie-stdpush.t :lib:tie-stdpush.t
--- :lib.n-p:tie-stdpush.t	Tue Jul 20 17:18:13 1999
+++ :lib:tie-stdpush.t	Sat May 27 10:03:37 2000
@@ -2,9 +2,14 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 use Tie::Array;
 tie @x,Tie::StdArray;
-require "op/push.t"
+if ($^O eq 'MacOS') {
+    require ":op:push.t"
+}
+else {
+    require "op/push.t"
+}
diff -ru :lib.n-p:timelocal.t :lib:timelocal.t
--- :lib.n-p:timelocal.t	Tue Jul 20 17:18:13 1999
+++ :lib:timelocal.t	Sat May 27 10:05:28 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 use Time::Local;
@@ -64,7 +64,7 @@
     $count++;
 }
 
-#print "Testing that the differences between a few dates makes sence...\n";
+#print "Testing that the differences between a few dates makes sense...\n";
 
 timelocal(0,0,1,1,0,90) - timelocal(0,0,0,1,0,90) == 3600
   or print "not ";
diff -ru :lib.n-p:trig.t :lib:trig.t
--- :lib.n-p:trig.t	Tue Jul 20 17:18:13 1999
+++ :lib:trig.t	Sat May 27 10:09:17 2000
@@ -10,7 +10,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 use Math::Trig;
End of Patch.


Peter Prymmer





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