From 0490ead761c64ce91123d21bea4b5ab14980173e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 14 Sep 2014 15:43:59 +0100 Subject: extend rst test to cover a fixed bug --- t/rst.t | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 't/rst.t') diff --git a/t/rst.t b/t/rst.t index 4e0c4b747..a72c4681c 100755 --- a/t/rst.t +++ b/t/rst.t @@ -8,7 +8,7 @@ BEGIN { } } -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*}); -- cgit v1.2.3