From b365d864c507c9f6e3374c1fb7c854ddb495aeae Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 7 Mar 2007 09:48:59 +0000 Subject: 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. --- t/linkify.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't/linkify.t') 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"); -- cgit v1.2.3