]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
color, toc: Fix `make test`
authorSimon McVittie <smcv@debian.org>
Tue, 16 May 2017 10:33:23 +0000 (11:33 +0100)
committerSimon McVittie <smcv@debian.org>
Tue, 16 May 2017 11:08:55 +0000 (12:08 +0100)
t/color.t
t/toc.t

index dca0d865c69692582e5c976a8c773d991fa28537..bd353b58ed6e8c1efe8a055c3db566ac09c2144f 100755 (executable)
--- 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";
 
 %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";
 sub render {
        my $content = shift;
        $IkiWiki::pagesources{foo} = "foo.mdwn";
diff --git a/t/toc.t b/t/toc.t
index ff8e9f9919794c507b986b8f55b4b05b18477cf9..dc737764797103e9dd47a79f2af7c6f0f0ac421b 100755 (executable)
--- 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)];
 %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();
 
 IkiWiki::loadplugins();
 IkiWiki::checkconfig();