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