ext/Errno/Errno_pm.PL Errno perl module create script
ext/Errno/Makefile.PL Errno extension makefile writer
ext/Fcntl/Fcntl.pm Fcntl extension Perl module
-ext/Fcntl/Fcntl.t See if Fcntl works
ext/Fcntl/Fcntl.xs Fcntl extension external subroutines
ext/Fcntl/Makefile.PL Fcntl extension makefile writer
-ext/Fcntl/syslfs.t See if large files work for sysio
+ext/Fcntl/t/fcntl.t See if Fcntl works
+ext/Fcntl/t/syslfs.t See if large files work for sysio
ext/File/Glob/bsd_glob.c File::Glob extension run time code
ext/File/Glob/bsd_glob.h File::Glob extension header file
ext/File/Glob/Changes File::Glob extension changelog
ext/POSIX/Makefile.PL POSIX extension makefile writer
ext/POSIX/POSIX.pm POSIX extension Perl module
ext/POSIX/POSIX.pod POSIX extension documentation
-ext/POSIX/POSIX.t See if POSIX works
ext/POSIX/POSIX.xs POSIX extension external subroutines
-ext/POSIX/sigaction.t See if POSIX::sigaction works
+ext/POSIX/t/posix.t See if POSIX works
+ext/POSIX/t/sigaction.t See if POSIX::sigaction works
ext/POSIX/typemap POSIX extension interface types
ext/re/hints/mpeix.pl Hints for re for named architecture
ext/re/Makefile.PL re extension makefile writer
lib/English.pm Readable aliases for short variables
lib/English.t See if English works
lib/Env.pm Map environment into ordinary variables
-lib/Env/array.t See if Env works
-lib/Env/env.t See if Env works for arrays
+lib/Env/t/array.t See if Env works for arrays
+lib/Env/t/env.t See if Env works
lib/exceptions.pl catch and throw routines
lib/Exporter.pm Exporter base class
lib/Exporter.t See if Exporter works
lib/File/DosGlob.pm Win32 DOS-globbing module
lib/File/DosGlob.t See if File::DosGlob works
lib/File/Find.pm Routines to do a find
-lib/File/Find/find.t See if File::Find works
-lib/File/Find/taint.t See if File::Find works with taint
+lib/File/Find/t/find.t See if File::Find works
+lib/File/Find/t/taint.t See if File::Find works with taint
lib/File/Path.pm Do things like `mkdir -p' and `rm -r'
lib/File/Path.t See if File::Path works
lib/File/Spec.pm portable operations on file names
lib/I18N/LangTags/test.pl See if I18N::LangTags works
lib/importenv.pl Perl routine to get environment into variables
lib/integer.pm For "use integer"
+lib/integer.t For "use integer" testing
lib/IPC/Open2.pm Open a two-ended pipe
lib/IPC/Open2.t See if IPC::Open2 works
lib/IPC/Open3.pm Open a three-ended pipe!
--- /dev/null
+use integer;
+
+use Test::More tests => 11;
+use Config;
+
+my $x = 4.5;
+my $y = 5.6;
+my $z;
+
+$z = $x + $y;
+is($z, 9, "plus");
+
+$z = $x - $y;
+is($z, -1, "minus");
+
+$z = $x * $y;
+is($z, 20, "times");
+
+$z = $x / $y;
+is($z, 0, "divide");
+
+$z = $x / $y;
+is($z, 0, "modulo");
+
+is($x, 4.5, "scalar still floating point");
+
+isnt(sqrt($x), 2, "functions still floating point");
+
+isnt($x ** .5, 2, "power still floating point");
+
+is(++$x, 5.5, "++ still floating point");
+
+SKIP: {
+ my $ivsize = $Config{ivsize};
+ skip "ivsize == $ivsize", 2 unless $ivsize == 4 || $ivsize == 8;
+
+ if ($ivsize == 4) {
+ $z = 2**31 - 1;
+ is($z + 1, -2147483648, "left shift");
+ } elsif ($ivsize == 8) {
+ $z = 2**63 - 1;
+ is($z + 1, -9223372036854775808, "left shift");
+ }
+}
+
+is(~0, -1, "unsigned");
use Config;
my %Core_Modules;
+my %Test;
unless (open(MANIFEST, "MANIFEST")) {
die "$0: failed to open 'MANIFEST': $!\n";
}
while (<MANIFEST>) {
- next unless m!^lib/(\S+?)\.pm!;
- my $module = $1;
- $module =~ s!/!::!g;
- add_by_name($module);
+ if (m!^(lib)/(\S+?)\.pm\s!) {
+ # Collecting modules names from under ext/ would be
+ # rather painful since the mapping from filenames
+ # to module names is not 100%.
+ my ($dir, $module) = ($1, $2);
+ $module =~ s!/!::!g;
+ add_by_name($module);
+ } elsif (m!^(lib|ext)/(\S+?)(?:\.t|/test.pl)\s!) {
+ my ($dir, $test) = ($1, $2);
+ $test =~ s!(\w+)/\1$!$1! if $dir eq 'ext';
+ $test =~ s!/t/[^/]+$!!;
+ $test =~ s!/!::!g;
+ $Test{$test}++;
+ }
}
close(MANIFEST);
# Delete all modules which have their own tests.
# This makes this test a lot faster.
+foreach my $mod (sort keys %Test) {
+ delete_by_name($mod);
+}
foreach my $mod (<DATA>) {
chomp $mod;
+ print "### $mod\n" if exists $Test{$mod};
delete_by_name($mod);
}
# Add here modules that have their own test scripts and therefore
# need not be test-compiled by 1_compile.t.
__DATA__
-AnyDBM_File
-Attribute::Handlers
-AutoLoader
-B
-B::Debug
-B::Deparse
B::ShowLex
-B::Stash
-Benchmark
-CGI
CGI::Apache
CGI::Carp
CGI::Cookie
CGI::Pretty
CGI::Switch
CGI::Util
-Carp
Carp::Heavy
-Class::ISA
-Class::Struct
-CPAN
-Cwd
-DB_File
-Data::Dumper
Devel::DProf
-Devel::Peek
-Devel::SelfStubber
-Digest
-Digest::MD5
-DirHandle
Dumpvalue
-Encode
-English
-Env
-Errno
-Exporter
Exporter::Heavy
ExtUtils::Constant
ExtUtils::MakeMaker
-Fatal
-Fcntl
-File::Basename
-File::CheckTree
-File::Compare
-File::Copy
-File::DosGlob
-File::Find
-File::Glob
-File::Path
-File::Spec
-File::Spec::Functions
-File::Temp
-File::stat
-FileCache
-FileHandle
-Filter::Simple
Filter::Util::Call
-FindBin
GDBM_File
-Getopt::Long
-Getopt::Std
-I18N::Langinfo
-I18N::LangTags
I18N::LangTags::List
-I18N::Collate
IO::Dir
IO::File
IO::Handle
IO::Socket
IO::Socket::INET
IO::Socket::UNIX
-IPC::Open2
-IPC::Open3
-IPC::SysV
-Lingua::KO::Hangul::Util
-List::Util
Locale::Constants
Locale::Country
Locale::Currency
Locale::Language
-Locale::Maketext
-MIME::Base64
MIME::QuotedPrint
Math::BigFloat
-Math::BigInt
Math::BigInt::Calc
-Math::Complex
-Math::Trig
-Memoize
Memoize::AnyDBM_File
Memoize::Expire
Memoize::ExpireFile
Memoize::SDBM_File
Memoize::Storable
NDBM_File
-NEXT
-Net::hostent
-Net::netent
-Net::protoent
-Net::servent
ODBM_File
-Opcode
-PerlIO
-POSIX
Pod::Checker
Pod::Find
Pod::Text
SDBM_File
Safe
Scalar::Util
-Search::Dict
-SelectSaver
-SelfLoader
-Shell
-Socket
-Storable
-Switch
-Symbol
-Sys::Hostname
Sys::Syslog
-Term::ANSIColor
-Test
-Test::Harness
Test::More
-Test::Simple
Test::ParseWords
-Text::Abbrev
-Text::Balanced
-Text::ParseWords
-Text::Soundex
Text::Tabs
Text::Wrap
Thread
Tie::Array
Tie::Handle
Tie::Hash
-Tie::RefHash
Tie::Scalar
-Tie::SubstrHash
-Time::HiRes
-Time::Local
-Time::gmtime
-Time::localtime
Time::tm
-Unicode::Collate
-Unicode::Normalize
-Unicode::UCD
UNIVERSAL
-User::grent
-User::pwent
-XS::Typemap
attributes
-attrs
-autouse
base
bytes
-charnames
-constant
-diagnostics
-fields
-integer
-less
-locale
ops
-overload
-strict
-subs
-utf8
-vars
-warnings
warnings::register