6 if (system("python3 -c 'import docutils.core'") != 0) {
7 eval 'use Test::More skip_all => "docutils not available"';
11 use Test::More tests => 3;
13 BEGIN { use_ok("IkiWiki"); }
15 %config=IkiWiki::defaultconfig();
16 $config{srcdir}=$config{destdir}="/dev/null";
18 $config{add_plugins}=[qw(rst)];
19 IkiWiki::loadplugins();
20 IkiWiki::checkconfig();
22 like(IkiWiki::htmlize("foo", "foo", "rst", "foo\n"), qr{\s*<p>foo</p>\s*});
23 # regression test for [[bugs/rst fails on file containing only a number]]
24 my $html = IkiWiki::htmlize("foo", "foo", "rst", "11");
25 $html =~ s/<[^>]*>//g;
26 like($html, qr{\s*11\s*});