3 # Modules should have their own tests. For historical reasons, some
4 # do not. This does basic compile tests on modules that have no tests
14 use File::Spec::Functions;
16 # Okay, this is the list.
18 my @Core_Modules = grep /\S/, <DATA>;
21 if (eval { require Socket }) {
22 push @Core_Modules, qw(Net::Domain);
23 # Two Net:: modules need the Convert::EBCDIC if in EBDCIC.
24 if (ord("A") != 193 || eval { require Convert::EBCDIC }) {
25 push @Core_Modules, qw(Net::Cmd Net::POP3);
28 if(eval { require B }) {
29 push @Core_Modules, qw(B::C B::CC B::Stackobj);
32 @Core_Modules = sort @Core_Modules;
34 print "1..".(1+@Core_Modules)."\n";
37 = "ok 1 - All modules should have tests # TODO Make Schwern Poorer\n";
44 # http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-04/msg01223.html
45 # 20010421230349.P2946@blackrider.blackstar.co.uk
50 foreach my $module (@Core_Modules) {
52 $todo = "# TODO $module needs porting on $^O" if $module eq 'ByteLoader' && $^O eq 'VMS';
53 print "# $module compile failed\nnot " unless compile_module($module);
54 print "ok $test_num $todo\n";
58 # We do this as a separate process else we'll blow the hell
59 # out of our namespace.
63 my $compmod = catfile(curdir(), 'lib', 'compmod.pl');
64 my $lib = '-I' . catdir(updir(), 'lib');
66 my $out = scalar `$^X $lib $compmod $module`;
71 # These modules have no tests of their own.
72 # Keep up to date with
73 # http://www.pobox.com/~schwern/cgi-bin/perl-qa-wiki.cgi?UntestedModules
74 # and vice-versa. The list should only shrink.