]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
add test
authorJoey Hess <joey@kitenet.net>
Thu, 6 May 2010 02:12:31 +0000 (22:12 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 6 May 2010 02:12:31 +0000 (22:12 -0400)
t/template_syntax.t [new file with mode: 0755]

diff --git a/t/template_syntax.t b/t/template_syntax.t
new file mode 100755 (executable)
index 0000000..1e156ee
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Test::More;
+
+my @templates=glob("templates/*.tmpl"), glob("doc/templates/*.mdwn");
+plan(tests => 2*@templates);
+
+use HTML::Template;
+
+foreach my $template (@templates) {
+       my $obj=eval {HTML::Template->new(filename => $template)};
+       ok(! $@, $template." $@");
+       ok($obj, $template);
+}