Change 17780 by [EMAIL PROTECTED] on 2002/08/25 19:03:50

        fix bignum test failures

Affected files ...

.... //depot/perl/lib/bignum/t/biinfnan.t#2 edit
.... //depot/perl/lib/bignum/t/bninfnan.t#3 edit
.... //depot/perl/lib/bignum/t/brinfnan.t#2 edit

Differences ...

==== //depot/perl/lib/bignum/t/biinfnan.t#2 (text) ====
Index: perl/lib/bignum/t/biinfnan.t
--- perl/lib/bignum/t/biinfnan.t#1~17758~       Thu Aug 22 15:29:45 2002
+++ perl/lib/bignum/t/biinfnan.t        Sun Aug 25 12:03:50 2002
@@ -8,8 +8,26 @@
 BEGIN
   {
   $| = 1;
-  chdir 't' if -d 't';
-  unshift @INC, '../lib';
+  my $location = $0; $location =~ s{^(.*/).*}{$1};
+  if ($ENV{PERL_CORE})
+    {
+    @INC = qw(../lib);          # testing with the core distribution
+    }
+  else
+    {
+    unshift @INC, '../lib';     # for testing manually
+    }
+  if (-d 't')
+    {
+    chdir 't';
+    require File::Spec;
+    unshift @INC, File::Spec->catdir(File::Spec->updir, $location);
+    }
+  else
+    {
+    unshift @INC, $location;
+    }
+  print "# INC = @INC\n";
   plan tests => 26;
   }
 

==== //depot/perl/lib/bignum/t/bninfnan.t#3 (text) ====
Index: perl/lib/bignum/t/bninfnan.t
--- perl/lib/bignum/t/bninfnan.t#2~17779~       Sun Aug 25 11:56:29 2002
+++ perl/lib/bignum/t/bninfnan.t        Sun Aug 25 12:03:50 2002
@@ -8,7 +8,7 @@
 BEGIN
   {
   $| = 1;
-  my $location = $0; $location =~ s/biinfnan.t//i;
+  my $location = $0; $location =~ s{^(.*/).*}{$1};
   if ($ENV{PERL_CORE})
     {
     @INC = qw(../lib);          # testing with the core distribution

==== //depot/perl/lib/bignum/t/brinfnan.t#2 (text) ====
Index: perl/lib/bignum/t/brinfnan.t
--- perl/lib/bignum/t/brinfnan.t#1~17758~       Thu Aug 22 15:29:45 2002
+++ perl/lib/bignum/t/brinfnan.t        Sun Aug 25 12:03:50 2002
@@ -8,8 +8,26 @@
 BEGIN
   {
   $| = 1;
-  chdir 't' if -d 't';
-  unshift @INC, '../lib';
+  my $location = $0; $location =~ s{^(.*/).*}{$1};
+  if ($ENV{PERL_CORE})
+    {
+    @INC = qw(../lib);          # testing with the core distribution
+    }
+  else
+    {
+    unshift @INC, '../lib';     # for testing manually
+    }
+  if (-d 't')
+    {
+    chdir 't';
+    require File::Spec;
+    unshift @INC, File::Spec->catdir(File::Spec->updir, $location);
+    }
+  else
+    {
+    unshift @INC, $location;
+    }
+  print "# INC = @INC\n";
   plan tests => 26;
   }
 
End of Patch.

Reply via email to