summaryrefslogtreecommitdiff
path: root/t/html.t
blob: f2955f75f8394bbbdb06074a82bb7778ddca30a1 (plain)
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. use Test::More;
  5. my @pages;
  6. BEGIN {
  7. @pages=qw(index todo features news);
  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 + 3);
  13. }
  14. use_ok("IkiWiki");
  15. use_ok("IkiWiki::Render");
  16. }
  17. # Have to build the html pages first.
  18. # Note that just building them like this doesn't exersise all the possible
  19. # html that can be generated, in particular it misses some of the action
  20. # links at the top, etc.
  21. ok(system("make >/dev/null") == 0);
  22. foreach my $page (@pages) {
  23. print "# Validating $page\n";
  24. ok(system("validate html/$page.html") == 0);
  25. }
  26. # TODO: validate form output html