7 my $installed = $ENV{INSTALLED_TESTS};
9 ok(! system("rm -rf t/tmp; mkdir t/tmp"));
13 @command = qw(env LC_ALL=C ikiwiki);
16 ok(! system("make -s ikiwiki.out"));
17 ok(! system("make underlay_install DESTDIR=`pwd`/t/tmp/install PREFIX=/usr >/dev/null"));
18 @command = (qw(env LC_ALL=C perl), "-I".getcwd, qw(./ikiwiki.out
19 --underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki
20 --set underlaydirbase=t/tmp/install/usr/share/ikiwiki
21 --templatedir=templates));
24 foreach my $plugin ("", "listdirectives") {
25 ok(! system(@command, qw(--rebuild --plugin brokenlinks),
26 # always enabled because pages link to it conditionally,
27 # which brokenlinks cannot handle properly
29 ($plugin ? ("--plugin", $plugin) : ()),
30 qw(t/basewiki_brokenlinks t/tmp/out)));
31 my $result=`grep 'no broken links' t/tmp/out/index.html`;
33 if (! length $result) {
34 print STDERR "\n\nbroken links found".($plugin ? " (with $plugin)" : "")."\n";
35 system("grep '<li>' t/tmp/out/index.html >&2");
38 ok(-e "t/tmp/out/style.css"); # linked to..
39 ok(! system("rm -rf t/tmp/out t/basewiki_brokenlinks/.ikiwiki"));
41 ok(! system("rm -rf t/tmp"));