4 use Test::More tests => 4;
7 BEGIN { use_ok("IkiWiki"); }
9 # Initialize htmlscrubber plugin
10 %config=IkiWiki::defaultconfig();
11 $config{srcdir}=$config{destdir}="/dev/null";
12 IkiWiki::loadplugins();
13 IkiWiki::checkconfig();
15 is(IkiWiki::htmlize("foo", "mdwn", "foo\n\nbar\n"), "<p>foo</p>\n\n<p>bar</p>\n",
17 is(IkiWiki::htmlize("foo", "mdwn", readfile("t/test1.mdwn")),
18 Encode::decode_utf8(qq{<p><img src="../images/o.jpg" alt="o" title="ó" />\nóóóóó</p>\n}),
20 ok(IkiWiki::htmlize("foo", "mdwn", readfile("t/test2.mdwn")),
21 "this file crashes markdown if it's fed in as decoded utf-8");