color, toc: Fix `make test`

master
Simon McVittie 2017-05-16 11:33:23 +01:00
parent 01f2a84360
commit afdf8c0a8c
2 changed files with 17 additions and 0 deletions

View File

@ -10,6 +10,14 @@ BEGIN { use_ok("IkiWiki::Render"); }
%config=IkiWiki::defaultconfig(); %config=IkiWiki::defaultconfig();
$config{srcdir}=$config{destdir}="/dev/null"; $config{srcdir}=$config{destdir}="/dev/null";
my $installed = $ENV{INSTALLED_TESTS};
unless ($installed) {
$config{templatedir} = "templates";
$config{underlaydir} = "underlays/basewiki";
$config{underlaydirbase} = "underlays";
}
sub render { sub render {
my $content = shift; my $content = shift;
$IkiWiki::pagesources{foo} = "foo.mdwn"; $IkiWiki::pagesources{foo} = "foo.mdwn";

View File

@ -10,6 +10,15 @@ BEGIN { use_ok("IkiWiki::Render"); }
%config=IkiWiki::defaultconfig(); %config=IkiWiki::defaultconfig();
$config{srcdir}=$config{destdir}="/dev/null"; $config{srcdir}=$config{destdir}="/dev/null";
$config{add_plugins}=[qw(toc)]; $config{add_plugins}=[qw(toc)];
my $installed = $ENV{INSTALLED_TESTS};
unless ($installed) {
$config{templatedir} = "templates";
$config{underlaydir} = "underlays/basewiki";
$config{underlaydirbase} = "underlays";
}
IkiWiki::loadplugins(); IkiWiki::loadplugins();
IkiWiki::checkconfig(); IkiWiki::checkconfig();