summaryrefslogtreecommitdiff
path: root/lib/bignum
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-08-25 19:03:50 +0000
committerhv <hv@crypt.org>2002-08-25 19:03:50 +0000
commit0772a4e5ebeb4d946aa2ef5ed4d54b8a567fca2e (patch)
tree5fed7efaa5c293866f0dc65e7e2b2564e48fe7b2 /lib/bignum
parent24716a002766c3e656eeb2fe964bfcbafec661f3 (diff)
downloadperl-0772a4e5ebeb4d946aa2ef5ed4d54b8a567fca2e.tar.gz
fix bignum test failures
p4raw-id: //depot/perl@17780
Diffstat (limited to 'lib/bignum')
-rw-r--r--lib/bignum/t/biinfnan.t22
-rw-r--r--lib/bignum/t/bninfnan.t2
-rw-r--r--lib/bignum/t/brinfnan.t22
3 files changed, 41 insertions, 5 deletions
diff --git a/lib/bignum/t/biinfnan.t b/lib/bignum/t/biinfnan.t
index 84d3a71bfa..758bed1e58 100644
--- a/lib/bignum/t/biinfnan.t
+++ b/lib/bignum/t/biinfnan.t
@@ -8,8 +8,26 @@ use strict;
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;
}
diff --git a/lib/bignum/t/bninfnan.t b/lib/bignum/t/bninfnan.t
index 9fac5bde55..2b84406866 100644
--- a/lib/bignum/t/bninfnan.t
+++ b/lib/bignum/t/bninfnan.t
@@ -8,7 +8,7 @@ use strict;
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
diff --git a/lib/bignum/t/brinfnan.t b/lib/bignum/t/brinfnan.t
index 689a855698..266c51b5de 100644
--- a/lib/bignum/t/brinfnan.t
+++ b/lib/bignum/t/brinfnan.t
@@ -8,8 +8,26 @@ use strict;
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;
}