Commit | Line | Data |
---|---|---|
35bab742 | 1 | #!/usr/bin/perl |
2 | # vim: set ft=perl: | |
3 | # | |
4 | # This test attempts to load every .pm file in MANIFEST. | |
5 | # It might be naive. | |
6 | # | |
7 | ||
8 | my @perlmods; | |
44fb27ae | 9 | |
10 | use Test::More; | |
11 | use SQL::Translator; | |
35bab742 | 12 | |
13 | unless (open MANIFH, "MANIFEST") { | |
44fb27ae | 14 | plan skip_all => "Can't open MANIFEST! ($!)"; |
35bab742 | 15 | exit; |
16 | } | |
44fb27ae | 17 | |
35bab742 | 18 | while (<MANIFH>) { |
19 | chomp; | |
aea22daf | 20 | if (s,^lib/,, && s/\.pm$//) { |
35bab742 | 21 | s,/,::,g; |
35bab742 | 22 | push @perlmods, $_ |
23 | } | |
24 | } | |
25 | ||
35bab742 | 26 | close MANIFH; |
27 | ||
5dada97b | 28 | @perlmods = sort @perlmods; # aesthetics |
44fb27ae | 29 | plan tests => scalar @perlmods; |
30 | ||
35bab742 | 31 | for my $mod (@perlmods) { |
5dada97b | 32 | use_ok($mod); |
35bab742 | 33 | } |
34 |