4 use Test::More 'no_plan';
6 ok(! system("rm -rf t/tmp; mkdir t/tmp"));
7 ok(! system("make -s ikiwiki.out"));
8 ok(! system("make extra_install DESTDIR=`pwd`/t/tmp/install PREFIX=/usr >/dev/null"));
10 foreach my $plugin ("", "listdirectives") {
11 ok(! system("perl -I. ./ikiwiki.out -rebuild -plugin brokenlinks ".
12 # always enabled because pages link to it conditionally,
13 # which brokenlinks cannot handle properly
15 ($plugin ? "-plugin $plugin " : "").
16 "-underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki ".
17 "-set underlaydirbase=t/tmp/install/usr/share/ikiwiki ".
18 "-templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
19 my $result=`grep 'no broken links' t/tmp/out/index.html`;
21 if (! length $result) {
22 print STDERR "\n\nbroken links found".($plugin ? " (with $plugin)" : "")."\n";
23 system("grep '<li>' t/tmp/out/index.html >&2");
26 ok(-e "t/tmp/out/style.css"); # linked to..
27 ok(! system("rm -rf t/tmp/out t/basewiki_brokenlinks/.ikiwiki"));
29 ok(! system("rm -rf t/tmp"));