X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/1fc3f034191d3eec78b4d5da343e282092a221be..9b932611101d310def92c1e58c0385ef1903880f:/t/rst.t diff --git a/t/rst.t b/t/rst.t index 4e0c4b747..7908c0fb2 100755 --- a/t/rst.t +++ b/t/rst.t @@ -3,12 +3,12 @@ use warnings; 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"); } @@ -19,4 +19,8 @@ $config{add_plugins}=[qw(rst)]; IkiWiki::loadplugins(); IkiWiki::checkconfig(); -ok(IkiWiki::htmlize("foo", "foo", "rst", "foo\n") =~ m{\s*

foo

\s*}); +like(IkiWiki::htmlize("foo", "foo", "rst", "foo\n"), qr{\s*

foo

\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*});