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

[MacPerl-Porters] [PATCH 5.6.0] tests in :t:pod:




Greetings,

As I might have suspected the :pod: tests proved quite troublesome.
After applying the enclosed patch they _all_ died with results
similar to these for emptycmd.t which reflects the fact that I
do not have anything from :ext: built (hence I am missing IO::File from
my :lib: folder) but I find the first error message particularly
troubling in that:

miniperl :pod:emptycmd.t
opendir(:pod:/..): No such file or directory at :pod:testp2pt.pl line 8
Can't locate IO/File.pm in @INC (@INC contains:  :pod: ::lib: : ::) at ::lib:FileHandle.pm line 9.
Compilation failed in require at :pod:testcmp.pl line 10.
BEGIN failed--compilation aborted at :pod:testcmp.pl line 10.
Compilation failed in require at :pod:testp2pt.pl line 10.
BEGIN failed--compilation aborted at :pod:testp2pt.pl line 14.
Compilation failed in require at :pod:emptycmd.t line 5.
BEGIN failed--compilation aborted at :pod:emptycmd.t line 7.

So looking at line 8 in the modified testp2pt.pl we see:

   my $THISDIR = abs_path(dirname $0);
   
and it would appear that some work on Mac-ifying :lib:Cwd.pm may be in
order here (er, or perhaps it's File::Basename::dirname()'s fault?).  
Unfortunately, the enclosed patch does not address those issues :-)


diff -ru :pod.orig:emptycmd.t :pod:emptycmd.t
--- :pod.orig:emptycmd.t	Sat Oct  2 05:29:53 1999
+++ :pod:emptycmd.t	Mon May 29 19:40:40 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:for.t :pod:for.t
--- :pod.orig:for.t	Sat Oct  2 05:29:53 1999
+++ :pod:for.t	Sat Jun  3 16:16:15 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:headings.t :pod:headings.t
--- :pod.orig:headings.t	Sat Oct  2 05:29:53 1999
+++ :pod:headings.t	Sat Jun  3 16:19:24 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:include.t :pod:include.t
--- :pod.orig:include.t	Sat Oct  2 05:29:53 1999
+++ :pod:include.t	Sat Jun  3 16:21:08 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:included.t :pod:included.t
--- :pod.orig:included.t	Sat Oct  2 05:29:53 1999
+++ :pod:included.t	Sat Jun  3 16:24:53 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
@@ -18,7 +18,7 @@
 # This file is =included by "include.t"
 #
 # This text should NOT be in the resultant pod document
-# because we havent seen an =xxx pod directive in this file!
+# because we haven't seen an =xxx pod directive in this file!
 ##------------------------------------------------------------
 
 =pod
@@ -30,6 +30,6 @@
 
 ##------------------------------------------------------------
 # This text should NOT be in the resultant pod document
-# because it is *after* an =cut an no other pod directives
-# proceed it!
+# because it is *after* an =cut and no other pod directives
+# precede it!
 ##------------------------------------------------------------
diff -ru :pod.orig:lref.t :pod:lref.t
--- :pod.orig:lref.t	Sat Oct  2 05:29:53 1999
+++ :pod:lref.t	Sat Jun  3 16:26:23 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:multiline_items.t :pod:multiline_items.t
--- :pod.orig:multiline_items.t	Sat Oct  2 05:29:53 1999
+++ :pod:multiline_items.t	Sat Jun  3 16:27:55 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:nested_items.t :pod:nested_items.t
--- :pod.orig:nested_items.t	Sat Oct  2 05:29:53 1999
+++ :pod:nested_items.t	Sat Jun  3 16:29:07 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:nested_seqs.t :pod:nested_seqs.t
--- :pod.orig:nested_seqs.t	Sat Oct  2 05:29:53 1999
+++ :pod:nested_seqs.t	Sat Jun  3 16:30:31 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:oneline_cmds.t :pod:oneline_cmds.t
--- :pod.orig:oneline_cmds.t	Sat Oct  2 05:29:53 1999
+++ :pod:oneline_cmds.t	Sat Jun  3 16:40:14 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:pod2usage.t :pod:pod2usage.t
--- :pod.orig:pod2usage.t	Sat Oct  2 05:29:53 1999
+++ :pod:pod2usage.t	Sat Jun  3 16:41:12 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:poderrs.t :pod:poderrs.t
--- :pod.orig:poderrs.t	Sat Feb 26 15:03:38 2000
+++ :pod:poderrs.t	Sat Jun  3 16:42:46 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testpchk.pl";
    import TestPodChecker;
 }
diff -ru :pod.orig:podselect.t :pod:podselect.t
--- :pod.orig:podselect.t	Sat Oct  2 05:29:53 1999
+++ :pod:podselect.t	Sat Jun  3 16:43:54 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:special_seqs.t :pod:special_seqs.t
--- :pod.orig:special_seqs.t	Tue Feb 22 10:35:41 2000
+++ :pod:special_seqs.t	Sat Jun  3 16:45:05 2000
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
    chdir 't' if -d 't';
-   unshift @INC, './pod', '../lib';
+   unshift @INC, ($^O eq 'MacOS') ? (':pod:', '::lib:') : ('./pod', '../lib');
    require "testp2pt.pl";
    import TestPodIncPlainText;
 }
diff -ru :pod.orig:testp2pt.pl :pod:testp2pt.pl
--- :pod.orig:testp2pt.pl	Mon Mar 13 21:00:14 2000
+++ :pod:testp2pt.pl	Sat Jun  3 16:06:15 2000
@@ -4,7 +4,7 @@
    use File::Basename;
    use File::Spec;
    use Cwd qw(abs_path);
-   push @INC, '..';
+   push @INC, File::Spec->updir();
    my $THISDIR = abs_path(dirname $0);
    unshift @INC, $THISDIR;
    require "testcmp.pl";
End of MacPatch.

Peter Prymmer






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