Commit | Line | Data |
61f5c3f5 |
1 | #!/usr/bin/perl -w |
2 | |
8f675a64 |
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 |
7 | |
8 | use strict; |
9 | use Test; |
10 | |
11 | BEGIN |
12 | { |
13 | $| = 1; |
8f675a64 |
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 |
34 | plan tests => 1; |
35 | } |
36 | |
37 | my ($try,$ans,$x); |
38 | |
39 | use Math::BigInt(); $x = Math::BigInt->new(1); ++$x; |
40 | |
41 | ok ($x||'undef',2); |
42 | |
43 | # all tests done |
44 | |
45 | 1; |
46 | |