I still don't think 'rtl' is a suitable name for this switch
[ikiwiki.git] / t / rst.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4
5 BEGIN {
6         if (system("python -c 'import docutils.core'") != 0) {
7                 eval 'use Test::More skip_all => "docutils not available"';
8         }
9 }
10
11 use Test::More tests => 2;
12
13 BEGIN { use_ok("IkiWiki"); }
14
15 %config=IkiWiki::defaultconfig();
16 $config{srcdir}=$config{destdir}="/dev/null";
17 $config{libdir}=".";
18 $config{add_plugins}=[qw(rst)];
19 IkiWiki::loadplugins();
20 IkiWiki::checkconfig();
21
22 ok(IkiWiki::htmlize("foo", "foo", "rst", "foo\n") =~ m{\s*<p>foo</p>\s*});