Move Math::BigInt from ext/ to cpan/
[p5sagit/p5-mst-13.2.git] / cpan / Math-BigInt / t / require.t
CommitLineData
61f5c3f5 1#!/usr/bin/perl -w
2
990fb837 3# check that simple requiring BigInt works
4
61f5c3f5 5use strict;
6use Test;
7
8BEGIN
9 {
10 $| = 1;
8f675a64 11 # to locate the testing files
12 my $location = $0; $location =~ s/require.t//i;
13 if ($ENV{PERL_CORE})
14 {
15 # testing with the core distribution
16 @INC = qw(../t/lib);
17 }
18 unshift @INC, qw(../lib); # to locate the modules
19 if (-d 't')
20 {
21 chdir 't';
22 require File::Spec;
23 unshift @INC, File::Spec->catdir(File::Spec->updir, $location);
24 }
25 else
26 {
27 unshift @INC, $location;
28 }
29 print "# INC = @INC\n";
30
61f5c3f5 31 plan tests => 1;
32 }
33
8f675a64 34my ($x);
61f5c3f5 35
36require Math::BigInt; $x = Math::BigInt->new(1); ++$x;
37
61f5c3f5 38ok ($x||'undef',2);
39
40# all tests done
41