ikiwiki/t/syntax.t

21 lines
631 B
Perl
Raw Normal View History

2006-05-03 22:06:31 +02:00
#!/usr/bin/perl
use warnings;
use strict;
2006-09-25 22:15:02 +02:00
use Test::More;
2006-05-03 22:06:31 +02:00
my @progs="ikiwiki.in";
2006-05-03 22:06:31 +02:00
my @libs="IkiWiki.pm";
# monotone, external, amazon_s3, po, and cvs
# skipped since they need perl modules
push @libs, map { chomp; $_ } `find IkiWiki -type f -name \\*.pm | grep -v monotone.pm | grep -v external.pm | grep -v amazon_s3.pm | grep -v po.pm | grep -v cvs.pm`;
2008-08-04 01:21:07 +02:00
push @libs, 'IkiWiki/Plugin/skeleton.pm.example';
2006-05-03 22:06:31 +02:00
plan(tests => (@progs + @libs));
foreach my $file (@progs) {
ok(system("perl -c $file >/dev/null 2>&1") eq 0, $file);
2006-05-03 22:06:31 +02:00
}
foreach my $file (@libs) {
2006-09-25 22:15:02 +02:00
ok(system("perl -c $file >/dev/null 2>&1") eq 0, $file);
2006-05-03 22:06:31 +02:00
}