t: Consistently remove temp directory before testing, not after
[ikiwiki] / t / templates_documented.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Test::More;
5
6 plan(skip_all => 'running installed') if $ENV{INSTALLED_TESTS};
7
8 $/=undef;
9 open(IN, "doc/templates.mdwn") || die "doc/templates.mdwn: $!";
10 my $page=<IN>;
11 close IN;
12
13 foreach my $file (glob("templates/*.tmpl")) {
14         $file=~s/templates\///;
15         ok($page =~ /\Q$file\E/, "$file documented on doc/templates.mdwn");
16 }
17
18 done_testing();