7 BEGIN { use_ok("IkiWiki"); }
8 BEGIN { use_ok("IkiWiki::Render"); }
10 %config=IkiWiki::defaultconfig();
11 $config{srcdir}=$config{destdir}="/dev/null";
12 $config{add_plugins}=[qw(toc)];
14 my $installed = $ENV{INSTALLED_TESTS};
17 $config{templatedir} = "templates";
18 $config{underlaydir} = "underlays/basewiki";
19 $config{underlaydirbase} = "underlays";
22 IkiWiki::loadplugins();
23 IkiWiki::checkconfig();
27 $IkiWiki::pagesources{foo} = "foo.mdwn";
28 $IkiWiki::pagemtime{foo} = 42;
29 $IkiWiki::pagectime{foo} = 42;
30 $content = IkiWiki::filter("foo", "foo", $content);
31 $content = IkiWiki::preprocess("foo", "foo", $content);
32 $content = IkiWiki::linkify("foo", "foo", $content);
33 $content = IkiWiki::htmlize("foo", "foo", "mdwn", $content);
34 $content = IkiWiki::genpage("foo", $content);
38 # https://ikiwiki.info/todo/toc-with-human-readable-anchors/
39 # (toc-recycle-id part)
40 like(render('[[!toc ]]
43 These mustelids are weasilly recognised
45 <h2 id="the-chapter-on-stoats">Stoats</h2>
47 These are stoatally different
49 qr{(?s)<a href="\#index1h2">.*<a href="\#the-chapter-on-stoats">});