Just the fairy.
[dbsrgits/SQL-Translator.git] / t / 01load.t
CommitLineData
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
8my @perlmods;
44fb27ae 9
10use Test::More;
11use SQL::Translator;
35bab742 12
13unless (open MANIFH, "MANIFEST") {
44fb27ae 14 plan skip_all => "Can't open MANIFEST! ($!)";
35bab742 15 exit;
16}
44fb27ae 17
35bab742 18while (<MANIFH>) {
19 chomp;
aea22daf 20 if (s,^lib/,, && s/\.pm$//) {
35bab742 21 s,/,::,g;
35bab742 22 push @perlmods, $_
23 }
24}
25
35bab742 26close MANIFH;
27
5dada97b 28@perlmods = sort @perlmods; # aesthetics
44fb27ae 29plan tests => scalar @perlmods;
30
35bab742 31for my $mod (@perlmods) {
5dada97b 32 use_ok($mod);
35bab742 33}
34