aboutsummaryrefslogtreecommitdiff
path: root/t/rst.t
blob: 4e0c4b74775842cc930aca7c63dd501a34993e64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
use warnings;
use strict;

BEGIN {
	if (system("python -c 'import docutils.core'") != 0) {
		eval 'use Test::More skip_all => "docutils not available"';
	}
}

use Test::More tests => 2;

BEGIN { use_ok("IkiWiki"); }

%config=IkiWiki::defaultconfig();
$config{srcdir}=$config{destdir}="/dev/null";
$config{libdir}=".";
$config{add_plugins}=[qw(rst)];
IkiWiki::loadplugins();
IkiWiki::checkconfig();

ok(IkiWiki::htmlize("foo", "foo", "rst", "foo\n") =~ m{\s*<p>foo</p>\s*});