aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-03-07 09:48:59 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-03-07 09:48:59 +0000
commitb365d864c507c9f6e3374c1fb7c854ddb495aeae (patch)
treee8e4f848c6374d64394421a3c0b28da622896ba3 /t
parentb39495f5015d0e5037db7682a2dc625abb26c5b8 (diff)
downloadikiwiki-b365d864c507c9f6e3374c1fb7c854ddb495aeae.tar
ikiwiki-b365d864c507c9f6e3374c1fb7c854ddb495aeae.tar.gz
My fix to support encoded underscores in page titles broke links to pages
with underscores in their filenames, since the link code also used titlepage. Create a new linkpage function and have the link code use that instead.
Diffstat (limited to 't')
-rwxr-xr-xt/linkify.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/linkify.t b/t/linkify.t
index 18b47dcb7..1b297433a 100755
--- a/t/linkify.t
+++ b/t/linkify.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 15;
+use Test::More tests => 16;
BEGIN { use_ok("IkiWiki"); }
@@ -68,6 +68,7 @@ sub links_text ($$) {
ok(links_to("bar", linkify("foo", "foo", "link to [[bar]] ok", ["foo", "bar"])), "ok link");
+ok(links_to("bar_baz", linkify("foo", "foo", "link to [[bar_baz]] ok", ["foo", "bar_baz"])), "ok link");
ok(not_links_to("bar", linkify("foo", "foo", "link to \\[[bar]] ok", ["foo", "bar"])), "escaped link");
ok(links_to("page=bar", linkify("foo", "foo", "link to [[bar]] ok", ["foo"])), "broken link");
ok(links_to("bar", linkify("foo", "foo", "link to [[baz]] and [[bar]] ok", ["foo", "baz", "bar"])), "dual links");