aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2011-10-22 19:46:42 +0100
committerSimon McVittie <smcv@debian.org>2011-10-22 19:46:42 +0100
commitbc6bef9c562f91032f38f65be61406cc498203b0 (patch)
treef6922d979d790c465ed90134bfcc8352de963c61 /t
parent1e81affead1bf9a960daeb1990a028ac0f1810a5 (diff)
downloadikiwiki-bc6bef9c562f91032f38f65be61406cc498203b0.tar
ikiwiki-bc6bef9c562f91032f38f65be61406cc498203b0.tar.gz
Add a trivial test for the rst plugin
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 't')
-rwxr-xr-xt/rst.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/rst.t b/t/rst.t
new file mode 100755
index 000000000..4e0c4b747
--- /dev/null
+++ b/t/rst.t
@@ -0,0 +1,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*});