From bc6bef9c562f91032f38f65be61406cc498203b0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 22 Oct 2011 19:46:42 +0100 Subject: [PATCH] Add a trivial test for the rst plugin Signed-off-by: Simon McVittie --- t/rst.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 t/rst.t 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*

foo

\s*}); -- 2.39.5