aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2014-09-14 15:43:59 +0100
committerSimon McVittie <smcv@debian.org>2014-09-14 15:47:42 +0100
commit0490ead761c64ce91123d21bea4b5ab14980173e (patch)
treed87ba0592d6050b046e83313e65f7346ba06f6d4 /t
parent24a5dceb01e102d44b4294ae4ba73a082e0a71b6 (diff)
downloadikiwiki-0490ead761c64ce91123d21bea4b5ab14980173e.tar
ikiwiki-0490ead761c64ce91123d21bea4b5ab14980173e.tar.gz
extend rst test to cover a fixed bug
Diffstat (limited to 't')
-rwxr-xr-xt/rst.t8
1 files changed, 6 insertions, 2 deletions
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*<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*});