diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-04 17:44:41 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-04 17:44:41 +0000 |
commit | c986521fa3f17b71e39da3c3e4acebb736334697 (patch) | |
tree | 95f089e8e6931103401b068c3bbed6f0811ceda6 /lib/Math | |
parent | 9c735d5936d2e28562f488b19be586dbf4c6d6d2 (diff) | |
download | perl-c986521fa3f17b71e39da3c3e4acebb736334697.tar.gz |
Math::Big* test tweaks to work better with core:
but the coast still not clear.
p4raw-id: //depot/perl@12847
Diffstat (limited to 'lib/Math')
-rwxr-xr-x | lib/Math/BigInt/t/bigfltpm.t | 28 | ||||
-rwxr-xr-x | lib/Math/BigInt/t/bigintpm.t | 16 | ||||
-rwxr-xr-x | lib/Math/BigInt/t/sub_mbf.t | 28 | ||||
-rwxr-xr-x | lib/Math/BigInt/t/sub_mbi.t | 28 |
4 files changed, 82 insertions, 18 deletions
diff --git a/lib/Math/BigInt/t/bigfltpm.t b/lib/Math/BigInt/t/bigfltpm.t index d02caa69e6..6aa718131c 100755 --- a/lib/Math/BigInt/t/bigfltpm.t +++ b/lib/Math/BigInt/t/bigfltpm.t @@ -1,15 +1,33 @@ #!/usr/bin/perl -w +BEGIN { + $| = 1; + my $location = $0; + # to locate the testing files + $location =~ s/bigfltpm.t//i; + if ($ENV{PERL_CORE}) { + # testing with the core distribution + @INC = qw(../lib); + if (-d 't') { + chdir 't'; + require File::Spec; + unshift @INC, File::Spec->catdir(File::Spec->updir, $location); + } else { + unshift @INC, $location; + } + } else { + # for running manually with the CPAN distribution + unshift @INC, '../lib'; + $location =~ s/bigfltpm.t//; + } + print "# INC = @INC\n"; +} + use Test; use strict; BEGIN { - $| = 1; - unshift @INC, '../lib'; # for running manually - my $location = $0; $location =~ s/bigfltpm.t//; - unshift @INC, $location; # to locate the testing files - # chdir 't' if -d 't'; plan tests => 1277; } diff --git a/lib/Math/BigInt/t/bigintpm.t b/lib/Math/BigInt/t/bigintpm.t index eb1b43f0d2..6a8e68e50b 100755 --- a/lib/Math/BigInt/t/bigintpm.t +++ b/lib/Math/BigInt/t/bigintpm.t @@ -1,15 +1,25 @@ #!/usr/bin/perl -w +BEGIN { + $| = 1; + if ($ENV{PERL_CORE}) { + @INC = qw(../lib); + chdir 't' if -d 't'; + } else { + # for running manually with the CPAN distribution + unshift @INC, '../lib'; + } + print "# INC = @INC\n"; +} + use strict; use Test; BEGIN { - $| = 1; - # chdir 't' if -d 't'; - unshift @INC, '../lib'; # for running manually plan tests => 1457; } + my $version = '1.43'; # for $VERSION tests, match current release (by hand!) ############################################################################## diff --git a/lib/Math/BigInt/t/sub_mbf.t b/lib/Math/BigInt/t/sub_mbf.t index 946222cad3..0695ef2269 100755 --- a/lib/Math/BigInt/t/sub_mbf.t +++ b/lib/Math/BigInt/t/sub_mbf.t @@ -1,15 +1,33 @@ #!/usr/bin/perl -w +BEGIN { + $| = 1; + my $location = $0; + # to locate the testing files + $location =~ s/sub_mbf.t//i; + if ($ENV{PERL_CORE}) { + # testing with the core distribution + @INC = qw(../lib); + if (-d 't') { + chdir 't'; + require File::Spec; + unshift @INC, File::Spec->catdir(File::Spec->updir, $location); + } else { + unshift @INC, $location; + } + } else { + # for running manually with the CPAN distribution + unshift @INC, '../lib'; + $location =~ s/bigfltpm.t//; + } + print "# INC = @INC\n"; +} + use Test; use strict; BEGIN { - $| = 1; - unshift @INC, '../lib'; # for running manually - my $location = $0; $location =~ s/sub_mbf.t//; - unshift @INC, $location; # to locate the testing files - chdir 't' if -d 't'; plan tests => 1277 + 4; # + 4 own tests } diff --git a/lib/Math/BigInt/t/sub_mbi.t b/lib/Math/BigInt/t/sub_mbi.t index cb85a02328..20b8b8d1a3 100755 --- a/lib/Math/BigInt/t/sub_mbi.t +++ b/lib/Math/BigInt/t/sub_mbi.t @@ -1,15 +1,33 @@ #!/usr/bin/perl -w +BEGIN { + $| = 1; + my $location = $0; + # to locate the testing files + $location =~ s/sub_mbi.t//i; + if ($ENV{PERL_CORE}) { + # testing with the core distribution + @INC = qw(../lib); + if (-d 't') { + chdir 't'; + require File::Spec; + unshift @INC, File::Spec->catdir(File::Spec->updir, $location); + } else { + unshift @INC, $location; + } + } else { + # for running manually with the CPAN distribution + unshift @INC, '../lib'; + $location =~ s/bigfltpm.t//; + } + print "# INC = @INC\n"; +} + use Test; use strict; BEGIN { - $| = 1; - unshift @INC, '../lib'; # for running manually - my $location = $0; $location =~ s/sub_mbi.t//; - unshift @INC, $location; # to locate the testing files - chdir 't' if -d 't'; plan tests => 1608 + 4; # +4 own tests } |