#!/usr/bin/perl use warnings; use strict; use Cwd qw(getcwd); use Test::More; use IkiWiki; ok(! system("rm -rf t/tmp")); ok(mkdir "t/tmp"); ok(! system("cp -R t/tinyblog t/tmp/in")); ok(mkdir "t/tmp/in/post" or -d "t/tmp/in/post"); my $installed = $ENV{INSTALLED_TESTS}; my @command; if ($installed) { @command = qw(ikiwiki); } else { ok(! system("make -s ikiwiki.out")); @command = ("perl", "-I".getcwd, qw(./ikiwiki.out --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates)); } my $comment; $comment = <; close $fh or return undef; return $content; } my $content = slurp("t/tmp/out/post/index.html"); ok(defined $content); like($content, qr/I conquered.*I explored.*I landed/s); $content = slurp("t/tmp/out/post/index.atom"); ok(defined $content); like($content, qr{ '); unlike($content, qr{