use strict;
BEGIN {
- if (system("python -c 'import docutils.core'") != 0) {
+ if (system("python3 -c 'import docutils.core'") != 0) {
eval 'use Test::More skip_all => "docutils not available"';
}
}
-use Test::More tests => 2;
+use Test::More tests => 3;
BEGIN { use_ok("IkiWiki"); }
IkiWiki::loadplugins();
IkiWiki::checkconfig();
-ok(IkiWiki::htmlize("foo", "foo", "rst", "foo\n") =~ m{\s*<p>foo</p>\s*});
+like(IkiWiki::htmlize("foo", "foo", "rst", "foo\n"), qr{\s*<p>foo</p>\s*});
+# regression test for [[bugs/rst fails on file containing only a number]]
+my $html = IkiWiki::htmlize("foo", "foo", "rst", "11");
+$html =~ s/<[^>]*>//g;
+like($html, qr{\s*11\s*});