]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - t/html.t
fc6888dca7de7832767d6f16eb9aa036a4ee5752
[git.ikiwiki.info.git] / t / html.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Test::More;
6 my @pages;
8 BEGIN {
9         @pages=qw(index todo features news plugins/map security);
10         if (! -x "/usr/bin/validate") {
11                 plan skip_all => "/usr/bin/validate html validator not present";
12         }
13         else {
14                 plan(tests => int @pages + 3);
15         }
16         use_ok("IkiWiki");
17         use_ok("IkiWiki::Render");
18 }
20 # Have to build the html pages first.
21 # Note that just building them like this doesn't exersise all the possible
22 # html that can be generated, in particular it misses some of the action
23 # links at the top, etc.
24 ok(system("make >/dev/null") == 0);
26 foreach my $page (@pages) {
27         print "# Validating $page\n";
28         ok(system("validate html/$page.html") == 0);
29 }
31 # TODO: validate form output html