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("LC_ALL=C 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 "-templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
18 my $result=`grep 'no broken links' t/tmp/out/index.html`;
20 if (! length $result) {
21 print STDERR "\n\nbroken links found".($plugin ? " (with $plugin)" : "")."\n";
22 system("grep '<li>' t/tmp/out/index.html >&2");
25 ok(-e "t/tmp/out/style.css"); # linked to..
26 ok(! system("rm -rf t/tmp/out t/basewiki_brokenlinks/.ikiwiki"));
28 ok(! system("rm -rf t/tmp"));