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)];
13 IkiWiki::loadplugins();
14 IkiWiki::checkconfig();
18 $IkiWiki::pagesources{foo} = "foo.mdwn";
19 $IkiWiki::pagemtime{foo} = 42;
20 $IkiWiki::pagectime{foo} = 42;
21 $content = IkiWiki::filter("foo", "foo", $content);
22 $content = IkiWiki::preprocess("foo", "foo", $content);
23 $content = IkiWiki::linkify("foo", "foo", $content);
24 $content = IkiWiki::htmlize("foo", "foo", "mdwn", $content);
25 $content = IkiWiki::genpage("foo", $content);
29 # https://ikiwiki.info/todo/toc-with-human-readable-anchors/
30 # (toc-recycle-id part)
31 like(render('[[!toc ]]
34 These mustelids are weasilly recognised
36 <h2 id="the-chapter-on-stoats">Stoats</h2>
38 These are stoatally different
40 qr{(?s)<a href="\#index1h2">.*<a href="\#the-chapter-on-stoats">});