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