t/passwordauth.t: new automated test for passwordauth
[ikiwiki] / t / syntax.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Test::More;
5
6 plan(skip_all => 'running installed') if $ENV{INSTALLED_TESTS};
7
8 my @progs="ikiwiki.in";
9 my @libs="IkiWiki.pm";
10 # monotone, external, amazon_s3, po, and cvs
11 # skipped since they need perl modules
12 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`;
13 push @libs, 'IkiWiki/Plugin/skeleton.pm.example';
14
15 plan(tests => (@progs + @libs));
16
17 foreach my $file (@progs) {
18         ok(system("perl -c $file >/dev/null 2>&1") eq 0, $file);
19 }
20 foreach my $file (@libs) {
21         ok(system("perl -c $file >/dev/null 2>&1") eq 0, $file);
22 }