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

[MacPerl-Porters] [PATCH 5.6.0] tests in :t:lib:[d-f]*.t





Enclosed is a patch for tests :t:lib:[d-f]*.t.

Some more XS based tests are failing for me.

The File::Find module apparently needs to to be macified since
running the filefind.t test as modified below (which is not
necessarily the final form it will take) results in:

miniperl :lib:filefind.t
1..117
Can't stat .: No such file or directory
Can't stat .: No such file or directory
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
not ok 10
 Input/output error

The File::Path module needs to be macified.

One curious result in :lib:filespec.t was:

not ok 243 # Mac->rel2abs('','t1:t2:t3'): got 't1:t2:t3', expected ''

The FindBin module needs to be macified:

miniperl :lib:findbin.t
stat(.): No such file or directory at ::lib:FindBin.pm line 143
opendir(:lib:/..): No such file or directory at ::lib:FindBin.pm line 162
opendir(:lib:/..): No such file or directory at ::lib:FindBin.pm line 163
1..1
not ok 1

At any rate here is the patch:

diff -ru :lib.a-c:db-btree.t :lib:db-btree.t
--- :lib.a-c:db-btree.t	Tue Sep 14 06:45:17 1999
+++ :lib:db-btree.t	Wed May 17 12:59:16 2000
@@ -1,7 +1,12 @@
 #!./perl -w
 
 BEGIN {
-    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'} !~ /\bDB_File\b/) {
 	print "1..0 # Skip: DB_File was not built\n";
diff -ru :lib.a-c:db-hash.t :lib:db-hash.t
--- :lib.a-c:db-hash.t	Fri Aug 20 15:52:01 1999
+++ :lib:db-hash.t	Wed May 17 13:01:45 2000
@@ -1,7 +1,12 @@
 #!./perl -w
 
 BEGIN {
-    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'} !~ /\bDB_File\b/) {
 	print "1..0 # Skip: DB_File was not built\n";
diff -ru :lib.a-c:db-recno.t :lib:db-recno.t
--- :lib.a-c:db-recno.t	Sun Aug  1 21:08:20 1999
+++ :lib:db-recno.t	Wed May 17 13:03:25 2000
@@ -1,7 +1,12 @@
 #!./perl -w
 
 BEGIN {
-    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'} !~ /\bDB_File\b/) {
 	print "1..0 # Skip: DB_File was not built\n";
diff -ru :lib.a-c:dirhand.t :lib:dirhand.t
--- :lib.a-c:dirhand.t	Tue Jul 20 17:18:12 1999
+++ :lib:dirhand.t	Wed May 17 13:05:16 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';
+	}
     require Config; import Config;
     if (not $Config{'d_readdir'}) {
 	print "1..0\n";
diff -ru :lib.a-c:dosglob.t :lib:dosglob.t
--- :lib.a-c:dosglob.t	Tue Jul 20 17:18:12 1999
+++ :lib:dosglob.t	Wed May 17 13:10:59 2000
@@ -6,7 +6,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+	if ($^O eq 'MacOS') {
+        unshift @INC, '::lib:';
+	}
+	else {
+	    unshift @INC, '../lib';
+	}
 }
 
 print "1..10\n";
diff -ru :lib.a-c:dprof.t :lib:dprof.t
--- :lib.a-c:dprof.t	Tue Oct 12 16:27:05 1999
+++ :lib:dprof.t	Wed May 17 13:12:25 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';
+	}
 }
 
 END {
diff -ru :lib.a-c:dumper-ovl.t :lib:dumper-ovl.t
--- :lib.a-c:dumper-ovl.t	Tue Jul 20 17:18:12 1999
+++ :lib:dumper-ovl.t	Wed May 17 13:14:00 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';
+	}
 }
 
 use Data::Dumper;
diff -ru :lib.a-c:dumper.t :lib:dumper.t
--- :lib.a-c:dumper.t	Fri Jan 21 16:47:07 2000
+++ :lib:dumper.t	Wed May 17 13:16:13 2000
@@ -5,7 +5,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';
+	}
 }
 
 use Data::Dumper;
diff -ru :lib.a-c:english.t :lib:english.t
--- :lib.a-c:english.t	Sun Jan  9 18:57:40 2000
+++ :lib:english.t	Wed May 17 13:22:16 2000
@@ -2,7 +2,7 @@
 
 print "1..16\n";
 
-BEGIN { unshift @INC, '../lib' }
+BEGIN { unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib' }
 use English;
 use Config;
 my $threads = $Config{'use5005threads'} || 0;
@@ -43,5 +43,5 @@
 print $EUID == $> ? "ok 13\n" : "not ok 13\n";
 print $EGID == $) ? "ok 14\n" : "not ok 14\n";
 
-print $PROGRAM_NAME == $0 ? "ok 15\n" : "not ok 15\n";
+print $PROGRAM_NAME eq $0 ? "ok 15\n" : "not ok 15\n";
 print $BASETIME == $^T ? "ok 16\n" : "not ok 16\n";
diff -ru :lib.a-c:env-array.t :lib:env-array.t
--- :lib.a-c:env-array.t	Thu Mar  2 17:52:53 2000
+++ :lib:env-array.t	Wed May 17 13:24:55 2000
@@ -4,7 +4,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 if ($^O eq 'VMS') {
diff -ru :lib.a-c:env.t :lib:env.t
--- :lib.a-c:env.t	Thu Mar  2 17:52:53 2000
+++ :lib:env.t	Wed May 17 13:26:24 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 BEGIN {
diff -ru :lib.a-c:errno.t :lib:errno.t
--- :lib.a-c:errno.t	Tue Jul 20 17:18:12 1999
+++ :lib:errno.t	Wed May 17 13:28:29 2000
@@ -2,8 +2,13 @@
 
 BEGIN {
     unless(grep /blib/, @INC) {
-	chdir 't' if -d 't';
-	unshift @INC, '../lib' if -d '../lib';
+	    chdir 't' if -d 't';
+	    if ($^O eq 'MacOS') {
+	        unshift @INC, '::lib:' if -d '::lib:';
+	    }
+	    else {
+			unshift @INC, '../lib' if -d '../lib';
+	    }
     }
 }
 
diff -ru :lib.a-c:fatal.t :lib:fatal.t
--- :lib.a-c:fatal.t	Tue Mar  7 21:59:01 2000
+++ :lib:fatal.t	Wed May 17 15:32:38 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
    print "1..15\n";
 }
 
diff -ru :lib.a-c:fields.t :lib:fields.t
--- :lib.a-c:fields.t	Mon Mar 13 21:25:37 2000
+++ :lib:fields.t	Wed May 17 15:34:40 2000
@@ -4,7 +4,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';
+   }
    $SIG{__WARN__} = sub {
        if ($_[0] =~ /^Hides field 'b1' in base class/) {
            $w++;
diff -ru :lib.a-c:filecache.t :lib:filecache.t
--- :lib.a-c:filecache.t	Tue Jul 20 17:18:12 1999
+++ :lib:filecache.t	Wed May 17 15:35:54 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 print "1..1\n";
diff -ru :lib.a-c:filecopy.t :lib:filecopy.t
--- :lib.a-c:filecopy.t	Wed Jan  5 06:06:28 2000
+++ :lib:filecopy.t	Wed May 17 15:37:49 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 $| = 1;
diff -ru :lib.a-c:filefind.t :lib:filefind.t
--- :lib.a-c:filefind.t	Mon Mar  6 07:06:45 2000
+++ :lib:filefind.t	Sat May 20 09:17:42 2000
@@ -6,31 +6,37 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 if ( $symlink_exists ) { print "1..117\n"; }
 else                   { print "1..61\n"; }
 
 use File::Find;
+use File::Spec::Functions;
 
 find(sub { print "ok 1\n" if $_ eq 'filefind.t'; }, ".");
 finddepth(sub { print "ok 2\n" if $_ eq 'filefind.t'; }, ".");
 
-
 my $case = 2;
 
+my $fa = ($^O eq 'MacOS') ? ':fa' : 'fa';
+my $fb = ($^O eq 'MacOS') ? ':fb' : 'fb';
+my $for_find = ($^O eq 'MacOS') ? ':for_find:' : 'for_find';
+my $updir = ($^O eq 'MacOS') ? '::' : '..';
+
 END {
-    unlink 'fa/fa_ord','fa/fsl','fa/faa/faa_ord',
-	   'fa/fab/fab_ord','fa/fab/faba/faba_ord','fb/fb_ord','fb/fba/fba_ord';
-    rmdir 'fa/faa';
-    rmdir 'fa/fab/faba';
-    rmdir 'fa/fab';
-    rmdir 'fa';
-    rmdir 'fb/fba';
-    rmdir 'fb';
-    chdir '..';
-    rmdir 'for_find';
+    unlink catfile($fa,'fa_ord'),catfile($fa,'fsl'),catfile($fa,'faa','faa_ord'),
+	   catfile($fa,'fab','fab_ord'),catfile($fa,'fab','faba','faba_ord'),
+	   catfile($fb,'fb_ord'),catfile($fb,'fba','fba_ord');
+    rmdir catdir($fa,'faa');
+    rmdir catdir($fa,'fab','faba');
+    rmdir catdir($fa,'fab');
+    rmdir catdir($fa);
+    rmdir catdir($fb,'fba');
+    rmdir catdir($fb);
+    chdir $updir;
+    rmdir $for_find;
 }
 
 sub Check($) {
@@ -65,7 +71,8 @@
   my $n = $File::Find::name;
   $n =~ s#\.$## if ($^O eq 'VMS' && $n ne '.');
   print "# '$n' => 1\n";
-  my $i = rindex($n,'/');
+  my $i_chr = ($^O eq 'MacOS') ? ':' : '/';
+  my $i = rindex($n,$i_chr);
   my $OK = exists($Expect{$n});
   if ( $OK ) {
       $OK= exists($Expect{substr($n,0,$i)})  if $i >= 0;
@@ -77,7 +84,8 @@
 sub d_wanted {
   print "# '$_' => 1\n";
   s#\.$## if ($^O eq 'VMS' && $_ ne '.');
-  my $i = rindex($_,'/');
+  my $i_chr = ($^O eq 'MacOS') ? ':' : '/';
+  my $i = rindex($_,$i_chr);
   my $OK = exists($Expect{$_});
   if ( $OK ) {
       $OK= exists($Expect{substr($_,0,$i)})  if $i >= 0;
@@ -86,82 +94,150 @@
   delete $Expect{$_};
 }
 
-MkDir( 'for_find',0770 );
-CheckDie(chdir(for_find));
-MkDir( 'fa',0770 );
-MkDir( 'fb',0770  );
-touch('fb/fb_ord');
-MkDir( 'fb/fba',0770  );
-touch('fb/fba/fba_ord');
-CheckDie( symlink('../fb','fa/fsl') ) if $symlink_exists;
-touch('fa/fa_ord');
-
-MkDir( 'fa/faa',0770  );
-touch('fa/faa/faa_ord');
-MkDir( 'fa/fab',0770  );
-touch('fa/fab/fab_ord');
-MkDir( 'fa/fab/faba',0770  );
-touch('fa/fab/faba/faba_ord');
-
-%Expect = ('.' => 1, 'fsl' => 1, 'fa_ord' => 1, 'fab' => 1, 'fab_ord' => 1,
+MkDir( $for_find,0770 );
+CheckDie(chdir($for_find));
+MkDir( $fa,0770 );
+MkDir( $fb,0770  );
+touch(catfile($fb,'fb_ord'));
+MkDir( catdir($fb,'fba'),0770  );
+touch(catfile($fb,'fba','fba_ord'));
+CheckDie( symlink(catdir($updir,$fb),catdir($fa,'fsl')) ) if $symlink_exists;
+touch(catfile($fa,'fa_ord'));
+
+MkDir( catdir($fa,'faa'),0770  );
+touch(catfile($fa,'faa','faa_ord'));
+MkDir( catdir($fa,'fab'),0770  );
+touch(catfile($fa,'fab','fab_ord'));
+MkDir( catdir($fa,'fab','faba'),0770  );
+touch(catfile($fa,'fab','faba','faba_ord'));
+
+%Expect = ($^O eq 'MacOS') ? 
+       (':' => 1, 'fsl' => 1, 'fa_ord' => 1, 'fab' => 1, 'fab_ord' => 1,
+	   'faba' => 1, 'faa' => 1, 'faa_ord' => 1) :
+       ('.' => 1, 'fsl' => 1, 'fa_ord' => 1, 'fab' => 1, 'fab_ord' => 1,
 	   'faba' => 1, 'faa' => 1, 'faa_ord' => 1);
 delete $Expect{'fsl'} unless $symlink_exists;
-File::Find::find( {wanted => \&wanted, },'fa' );
+File::Find::find( {wanted => \&wanted, },$fa );
 Check( scalar(keys %Expect) == 0 );
 
-%Expect=('fa' => 1, 'fa/fsl' => 1, 'fa/fa_ord' => 1, 'fa/fab' => 1,
+%Expect = ($^O eq 'MacOS') ?
+     ($fa => 1, catdir($fa,'fsl') => 1, catdir($fa,'fa_ord') => 1, 
+	 catdir($fa,'fab') => 1, catdir($fa,'fab','fab_ord') => 1, 
+	 catdir($fa,'fab','faba') => 1, catdir($fa,'fab','faba','faba_ord') => 1, 
+	 catdir($fa,'faa') => 1, catdir($fa,'faa','faa_ord') => 1) : 
+     ('fa' => 1, 'fa/fsl' => 1, 'fa/fa_ord' => 1, 'fa/fab' => 1,
 	 'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1,
 	 'fa/fab/faba/faba_ord' => 1, 'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
-delete $Expect{'fa/fsl'} unless $symlink_exists;
-File::Find::find( {wanted => \&wanted, no_chdir => 1},'fa' );
+delete $Expect{catdir($fa,'fsl')} unless $symlink_exists;
+File::Find::find( {wanted => \&wanted, no_chdir => 1},$fa );
 
 Check( scalar(keys %Expect) == 0 );
 
-%Expect=('.' => 1, './fa' => 1, './fa/fsl' => 1, './fa/fa_ord' => 1, './fa/fab' => 1,
+%Expect = ($^O eq 'MacOS') ?
+        (':' => 1, ':fa:' => 1, ':fa:fsl' => 1, ':fa:fa_ord' => 1, ':fa:fab' => 1,
+         ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1,
+         ':fa:fab:faba:faba_ord' => 1, ':fa:faa' => 1, ':fa:faa:faa_ord' => 1,
+         ':fb:' => 1, ':fb:fba' => 1, ':fb:fba:fba_ord' => 1, ':fb:fb_ord' => 1) : 
+        ('.' => 1, './fa' => 1, './fa/fsl' => 1, './fa/fa_ord' => 1, './fa/fab' => 1,
          './fa/fab/fab_ord' => 1, './fa/fab/faba' => 1,
          './fa/fab/faba/faba_ord' => 1, './fa/faa' => 1, './fa/faa/faa_ord' => 1,
          './fb' => 1, './fb/fba' => 1, './fb/fba/fba_ord' => 1, './fb/fb_ord' => 1);
 delete $Expect{'./fa/fsl'} unless $symlink_exists;
-File::Find::finddepth( {wanted => \&dn_wanted },'.' );
+if ($^O eq 'MacOS') {
+    File::Find::finddepth( {wanted => \&dn_wanted },':' );
+}
+else {
+    File::Find::finddepth( {wanted => \&dn_wanted },'.' );
+}
 Check( scalar(keys %Expect) == 0 );
 
-%Expect=('.' => 1, './fa' => 1, './fa/fsl' => 1, './fa/fa_ord' => 1, './fa/fab' => 1,
+%Expect = ($^O eq 'MacOS') ?
+        (':' => 1, ':fa' => 1, ':fa:fsl' => 1, ':fa:fa_ord' => 1, ':fa:fab' => 1,
+         ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1,
+         ':fa:fab:faba:faba_ord' => 1, ':fa:faa' => 1, ':fa:faa:faa_ord' => 1,
+         ':fb' => 1, ':fb:fba' => 1, ':fb:fba:fba_ord' => 1, ':fb:fb_ord' => 1) : 
+        ('.' => 1, './fa' => 1, './fa/fsl' => 1, './fa/fa_ord' => 1, './fa/fab' => 1,
          './fa/fab/fab_ord' => 1, './fa/fab/faba' => 1,
          './fa/fab/faba/faba_ord' => 1, './fa/faa' => 1, './fa/faa/faa_ord' => 1,
          './fb' => 1, './fb/fba' => 1, './fb/fba/fba_ord' => 1, './fb/fb_ord' => 1);
 delete $Expect{'./fa/fsl'} unless $symlink_exists;
-File::Find::finddepth( {wanted => \&d_wanted, no_chdir => 1 },'.' );
+if ($^O eq 'MacOS') {
+    File::Find::finddepth( {wanted => \&d_wanted, no_chdir => 1 },':' );
+}
+else {
+    File::Find::finddepth( {wanted => \&d_wanted, no_chdir => 1 },'.' );
+}
 Check( scalar(keys %Expect) == 0 );
 
 if ( $symlink_exists ) {
-  %Expect=('.' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
+  %Expect = ($^O eq 'MacOS') ?
+            (':' => 1, ':fa_ord' => 1, ':fsl' => 1, ':fb_ord' => 1, ':fba' => 1,
+           ':fba_ord' => 1, ':fab' => 1, ':fab_ord' => 1, ':faba' => 1, ':faa' => 1,
+           ':faa_ord' => 1) : 
+          ('.' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1,
            'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faa' => 1,
            'faa_ord' => 1);
-
-  File::Find::find( {wanted => \&wanted, follow_fast => 1},'fa' );
+		   
+  if ($^O eq 'MacOS') {
+      File::Find::find( {wanted => \&wanted, follow_fast => 1},':fa' );
+  }
+  else {
+      File::Find::find( {wanted => \&wanted, follow_fast => 1},'fa' );
+  }
   Check( scalar(keys %Expect) == 0 );
 
-  %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
+  %Expect = ($^O eq 'MacOS') ?
+          (':fa' => 1, ':fa:fa_ord' => 1, ':fa:fsl' => 1, ':fa:fsl:fb_ord' => 1,
+           ':fa:fsl:fba' => 1, ':fa:fsl:fba:fba_ord' => 1, ':fa:fab' => 1,
+           ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1, ':fa:fab:faba:faba_ord' => 1,
+           ':fa:faa' => 1, ':fa:faa:faa_ord' => 1) : 
+		  ('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
            'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
            'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
            'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
-  File::Find::find( {wanted => \&wanted, follow_fast => 1, no_chdir => 1},'fa' );
+		   
+  if ($^O eq 'MacOS') {
+      File::Find::find( {wanted => \&wanted, follow_fast => 1, no_chdir => 1},':fa' );
+  }
+  else {
+      File::Find::find( {wanted => \&wanted, follow_fast => 1, no_chdir => 1},'fa' );
+  }
   Check( scalar(keys %Expect) == 0 );
 
-  %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
+  %Expect = ($^O eq 'MacOS') ? 
+          (':fa' => 1, ':fa:fa_ord' => 1, ':fa:fsl' => 1, ':fa:fsl:fb_ord' => 1,
+           ':fa:fsl:fba' => 1, ':fa:fsl:fba:fba_ord' => 1, ':fa:fab' => 1,
+           ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1, ':fa:fab:faba:faba_ord' => 1,
+           ':fa:faa' => 1, ':fa:faa:faa_ord' => 1) : 
+		  ('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
            'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
            'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
            'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
 
-  File::Find::finddepth( {wanted => \&dn_wanted, follow_fast => 1},'fa' );
+  if ($^O eq 'MacOS') {
+      File::Find::finddepth( {wanted => \&dn_wanted, follow_fast => 1},':fa' );
+  }
+  else {
+      File::Find::finddepth( {wanted => \&dn_wanted, follow_fast => 1},'fa' );
+  }
   Check( scalar(keys %Expect) == 0 );
 
-  %Expect=('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
+  %Expect = ($^O eq 'MacOS') ? 
+          (':fa' => 1, ':fa:fa_ord' => 1, ':fa:fsl' => 1, ':fa:fsl:fb_ord' => 1,
+           ':fa:fsl:fba' => 1, ':fa:fsl:fba:fba_ord' => 1, ':fa:fab' => 1,
+           ':fa:fab:fab_ord' => 1, ':fa:fab:faba' => 1, ':fa:fab:faba:faba_ord' => 1,
+           ':fa:faa' => 1, ':fa:faa:faa_ord' => 1) : 
+          ('fa' => 1, 'fa/fa_ord' => 1, 'fa/fsl' => 1, 'fa/fsl/fb_ord' => 1,
            'fa/fsl/fba' => 1, 'fa/fsl/fba/fba_ord' => 1, 'fa/fab' => 1,
            'fa/fab/fab_ord' => 1, 'fa/fab/faba' => 1, 'fa/fab/faba/faba_ord' => 1,
            'fa/faa' => 1, 'fa/faa/faa_ord' => 1);
 
-  File::Find::finddepth( {wanted => \&d_wanted, follow_fast => 1, no_chdir => 1},'fa' );
+  if ($^O eq 'MacOS') {
+      File::Find::finddepth( {wanted => \&d_wanted, follow_fast => 1, no_chdir => 1},':fa' );
+  }
+  else {
+      File::Find::finddepth( {wanted => \&d_wanted, follow_fast => 1, no_chdir => 1},'fa' );
+  }
   Check( scalar(keys %Expect) == 0 );
 }
 
diff -ru :lib.a-c:filefunc.t :lib:filefunc.t
--- :lib.a-c:filefunc.t	Tue Jul 20 17:18:12 1999
+++ :lib:filefunc.t	Wed May 17 21:36:51 2000
@@ -1,9 +1,9 @@
 #!./perl
 
 BEGIN {
-    $^O = '';
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
+    $^O = '';
 }
 
 print "1..1\n";
diff -ru :lib.a-c:filehand.t :lib:filehand.t
--- :lib.a-c:filehand.t	Tue Jul 20 17:18:12 1999
+++ :lib:filehand.t	Wed May 17 21:38:33 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{'extensions'} !~ /\bIO\b/ && $^O ne 'VMS') {
 	print "1..0\n";
diff -ru :lib.a-c:filepath.t :lib:filepath.t
--- :lib.a-c:filepath.t	Mon Mar 13 10:32:18 2000
+++ :lib:filepath.t	Thu May 18 18:31:07 2000
@@ -2,27 +2,30 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 use File::Path;
 use strict;
+use File::Spec::Functions;
 
 my $count = 0;
 use warnings;
 
 print "1..4\n";
 
+my $foo = ($^O eq 'MacOS') ? ':foo' : 'foo';
+
 # first check for stupid permissions second for full, so we clean up
 # behind ourselves
 for my $perm (0111,0777) {
-    mkpath("foo/bar");
-    chmod $perm, "foo", "foo/bar";
+    mkpath(catdir($foo,"bar"));
+    chmod $perm, catdir($foo), catdir($foo,"bar");
 
-    print "not " unless -d "foo" && -d "foo/bar";
+    print "not " unless -d catdir($foo) && -d catdir($foo,"bar");
     print "ok ", ++$count, "\n";
 
-    rmtree("foo");
+    rmtree(catdir($foo));
     print "not " if -e "foo";
     print "ok ", ++$count, "\n";
 }
diff -ru :lib.a-c:filespec.t :lib:filespec.t
--- :lib.a-c:filespec.t	Tue Mar 14 21:22:56 2000
+++ :lib:filespec.t	Thu May 18 18:36:18 2000
@@ -1,9 +1,9 @@
 #!./perl
 
 BEGIN {
-    $^O = '';
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
+    $^O = '';
 }
 
 # Each element in this array is a single test. Storing them this way makes
diff -ru :lib.a-c:findbin.t :lib:findbin.t
--- :lib.a-c:findbin.t	Tue Jul 20 17:18:12 1999
+++ :lib:findbin.t	Thu May 18 18:39:20 2000
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib';
 }
 
 print "1..1\n";
End of Patch.

Peter Prymmer






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