Document the Configure (really, awk) glitch in
[p5sagit/p5-mst-13.2.git] / t / lib / 1_compile.t
CommitLineData
7200bc44 1#!./perl
2
41f7d568 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
5# of their own.
6
7200bc44 7BEGIN {
41f7d568 8 chdir 't';
9 @INC = '../lib';
7200bc44 10}
11
12use strict;
13use warnings;
6b40b044 14
cdd2acaa 15# Okay, this is the list.
16
41f7d568 17my @Core_Modules = grep /\S/, sort <DATA>;
18chomp @Core_Modules;
7200bc44 19
4c4ccc83 20print "1..".(1+@Core_Modules)."\n";
7200bc44 21
4c4ccc83 22my $message
23 = "ok 1 - All modules should have tests # TODO Make Schwern Poorer\n";
24if (@Core_Modules) {
25 print "not $message";
26} else {
27 print $message;
28}
29
30my $test_num = 2;
cdd2acaa 31
7200bc44 32foreach my $module (@Core_Modules) {
17bcccd5 33 print "$module compile failed\nnot " unless compile_module($module);
7200bc44 34 print "ok $test_num\n";
35 $test_num++;
36}
37
656b9f42 38# We do this as a separate process else we'll blow the hell
39# out of our namespace.
7200bc44 40sub compile_module {
656b9f42 41 my ($module) = $_[0];
41f7d568 42
43 my $out = scalar `$^X "-I../lib" lib/compmod.pl $module`;
1189d1e4 44 print "# $out";
45 return $out =~ /^ok/;
7200bc44 46}
6b40b044 47
41f7d568 48# These modules have no tests of their own.
49# Keep up to date with
50# http://www.pobox.com/~schwern/cgi-bin/perl-qa-wiki.cgi?UntestedModules
51# and vice-versa. The list should only shrink.
6b40b044 52__DATA__
41f7d568 53B::CC
54B::Disassembler
55B::Stackobj
56ByteLoader
57CPAN
58CPAN::FirstTime
59DynaLoader
60ExtUtils::MM_NW5
61ExtUtils::Install
62ExtUtils::Liblist
63ExtUtils::Mksymlists
64Net::Cmd
65Net::Domain
66Net::POP3
67O
68Pod::Plainer
69Test::Harness::Iterator