diff options
author | Hugo van der Sanden <hv@crypt.org> | 2002-08-25 19:03:50 +0000 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-08-25 19:03:50 +0000 |
commit | 0772a4e5ebeb4d946aa2ef5ed4d54b8a567fca2e (patch) | |
tree | 5fed7efaa5c293866f0dc65e7e2b2564e48fe7b2 /lib/bignum | |
parent | 24716a002766c3e656eeb2fe964bfcbafec661f3 (diff) | |
download | perl-0772a4e5ebeb4d946aa2ef5ed4d54b8a567fca2e.tar.gz |
fix bignum test failures
p4raw-id: //depot/perl@17780
Diffstat (limited to 'lib/bignum')
-rw-r--r-- | lib/bignum/t/biinfnan.t | 22 | ||||
-rw-r--r-- | lib/bignum/t/bninfnan.t | 2 | ||||
-rw-r--r-- | lib/bignum/t/brinfnan.t | 22 |
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; } |