]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - t/html.t
Release to wheezy-security
[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         plan(skip_all => 'running installed') if $ENV{INSTALLED_TESTS};
11         @pages=qw(index features news plugins/map security);
12         if (! -x "/usr/bin/validate") {
13                 plan skip_all => "/usr/bin/validate html validator not present";
14         }
15         else {
16                 plan(tests => int @pages + 2);
17         }
18         use_ok("IkiWiki");
19 }
21 # Have to build the html pages first.
22 # Note that just building them like this doesn't exersise all the possible
23 # html that can be generated, in particular it misses some of the action
24 # links at the top, etc.
25 ok(system("make >/dev/null") == 0);
27 foreach my $page (@pages) {
28         print "# Validating $page\n";
29         ok(system("validate html/$page.html") == 0);
30 }
32 # TODO: validate form output html