Commit | Line | Data |
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 |
7 | BEGIN { |
41f7d568 |
8 | chdir 't'; |
9 | @INC = '../lib'; |
7200bc44 |
10 | } |
11 | |
12 | use strict; |
13 | use warnings; |
6b40b044 |
14 | |
cdd2acaa |
15 | # Okay, this is the list. |
16 | |
41f7d568 |
17 | my @Core_Modules = grep /\S/, sort <DATA>; |
18 | chomp @Core_Modules; |
7200bc44 |
19 | |
4c4ccc83 |
20 | print "1..".(1+@Core_Modules)."\n"; |
7200bc44 |
21 | |
4c4ccc83 |
22 | my $message |
23 | = "ok 1 - All modules should have tests # TODO Make Schwern Poorer\n"; |
24 | if (@Core_Modules) { |
25 | print "not $message"; |
26 | } else { |
27 | print $message; |
28 | } |
29 | |
30 | my $test_num = 2; |
cdd2acaa |
31 | |
7200bc44 |
32 | foreach 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 |
40 | sub 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 |
53 | B::CC |
54 | B::Disassembler |
55 | B::Stackobj |
56 | ByteLoader |
57 | CPAN |
58 | CPAN::FirstTime |
59 | DynaLoader |
60 | ExtUtils::MM_NW5 |
61 | ExtUtils::Install |
62 | ExtUtils::Liblist |
63 | ExtUtils::Mksymlists |
64 | Net::Cmd |
65 | Net::Domain |
66 | Net::POP3 |
67 | O |
68 | Pod::Plainer |
69 | Test::Harness::Iterator |