This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Math::BigFloat - fix bpi() and A [PATCH]
[perl5.git] / lib / Math / BigInt / t / use.t
CommitLineData
61f5c3f5
T
1#!/usr/bin/perl -w
2
8f675a64
JH
3# use Module(); doesn't call import() - thanx for cpan testers David. M. Town
4# and Andreas Marcel Riechert for spotting it. It is fixed by the same code
5# that fixes require Math::BigInt, but we make a test to be sure it really
6# works.
61f5c3f5
T
7
8use strict;
9use Test;
10
11BEGIN
12 {
13 $| = 1;
8f675a64
JH
14 # to locate the testing files
15 my $location = $0; $location =~ s/use.t//i;
16 if ($ENV{PERL_CORE})
17 {
18 # testing with the core distribution
19 @INC = qw(../t/lib);
20 }
21 unshift @INC, qw(../lib); # to locate the modules
22 if (-d 't')
23 {
24 chdir 't';
25 require File::Spec;
26 unshift @INC, File::Spec->catdir(File::Spec->updir, $location);
27 }
28 else
29 {
30 unshift @INC, $location;
31 }
32 print "# INC = @INC\n";
33
61f5c3f5
T
34 plan tests => 1;
35 }
36
37my ($try,$ans,$x);
38
39use Math::BigInt(); $x = Math::BigInt->new(1); ++$x;
40
41ok ($x||'undef',2);
42
43# all tests done
44
451;
46