From afdf8c0a8cd44f3141174337425eea75d67efcef Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 16 May 2017 11:33:23 +0100 Subject: [PATCH] color, toc: Fix `make test` --- t/color.t | 8 ++++++++ t/toc.t | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/t/color.t b/t/color.t index dca0d865c..bd353b58e 100755 --- a/t/color.t +++ b/t/color.t @@ -10,6 +10,14 @@ BEGIN { use_ok("IkiWiki::Render"); } %config=IkiWiki::defaultconfig(); $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 { my $content = shift; $IkiWiki::pagesources{foo} = "foo.mdwn"; diff --git a/t/toc.t b/t/toc.t index ff8e9f991..dc7377647 100755 --- a/t/toc.t +++ b/t/toc.t @@ -10,6 +10,15 @@ BEGIN { use_ok("IkiWiki::Render"); } %config=IkiWiki::defaultconfig(); $config{srcdir}=$config{destdir}="/dev/null"; $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::checkconfig(); -- 2.39.5