add a syntax check
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 3 May 2006 20:06:31 +0000 (20:06 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 3 May 2006 20:06:31 +0000 (20:06 +0000)
t/syntax.t [new file with mode: 0755]

diff --git a/t/syntax.t b/t/syntax.t
new file mode 100755 (executable)
index 0000000..1e6b047
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Test;
+
+my @progs="ikiwiki";
+my @libs="IkiWiki.pm";
+push @libs, map { chomp; $_ } `find IkiWiki -type f -name \\*.pm`;
+
+plan(tests => (@progs + @libs));
+
+foreach my $file (@progs) {
+        print "# Testing $file\n";
+        ok(system("perl -T -c $file >/dev/null 2>&1"), 0);
+}
+foreach my $file (@libs) {
+        print "# Testing $file\n";
+        ok(system("perl -c $file >/dev/null 2>&1"), 0);
+}