aboutsummaryrefslogtreecommitdiff
path: root/t/linkify.t
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-02-24 15:58:11 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-02-24 15:58:11 -0500
commitfa101abf08c51de72c6d02eb0be777dc843de6a1 (patch)
tree744a374e8dc9b235d0ec9f5ff9cbff4de18309b1 /t/linkify.t
parent5b43f0b95c17daf8f1a48582f538d9416f502b26 (diff)
downloadikiwiki-fa101abf08c51de72c6d02eb0be777dc843de6a1.tar
ikiwiki-fa101abf08c51de72c6d02eb0be777dc843de6a1.tar.gz
misc improvements
Diffstat (limited to 't/linkify.t')
-rwxr-xr-xt/linkify.t14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/linkify.t b/t/linkify.t
index 3939cabec..6922df343 100755
--- a/t/linkify.t
+++ b/t/linkify.t
@@ -22,11 +22,11 @@ sub linkify ($$$$) {
# This could change, if so, update it..
%IkiWiki::pagecase=();
%links=();
- foreach my $page (@existing_pages) {
- $IkiWiki::pagecase{lc $page}=$page;
- $links{$page}=[];
- $renderedfiles{"$page.mdwn"}=[$page];
- $destsources{$page}="$page.mdwn";
+ foreach my $p (@existing_pages) {
+ $IkiWiki::pagecase{lc $p}=$p;
+ $links{$p}=[];
+ $renderedfiles{"$p.mdwn"}=[$p];
+ $destsources{$p}="$p.mdwn";
}
%config=IkiWiki::defaultconfig();
@@ -93,8 +93,8 @@ foreach $prefix_directives (0,1) {
ok(links_text("0", linkify("foo", "foo", "link to [[0|bar]] ok", ["foo", "bar"])), "named link to 0");
ok(links_text("Some long, & complex page name.", linkify("foo", "foo", "link to [[Some_long,_&_complex_page_name.|bar]] ok, and this is not a link]] here", ["foo", "bar"])), "complex named link text");
ok(links_to("foo/bar", linkify("foo/item", "foo", "link to [[bar]] ok", ["foo", "foo/item", "foo/bar"])), "inline page link");
- ok(links_to("bar", linkify("foo", "foo", "link to [[bar]] ok", ["foo", "foo/item", "foo/bar"])), "same except not inline");
- ok(links_to("bar#baz", linkify("foo", "foo", "link to [[bar#baz]] ok", ["foo", "bar"])), "anchor link");
+ ok(links_to("bar", linkify("foo", "foo", "link to [[bar]] ok", ["foo", "foo/item", "foo/bar"])), "same except not inline");
+ ok(links_to("bar#baz", linkify("foo", "foo", "link to [[bar#baz]] ok", ["foo", "bar"])), "anchor link");
}
$prefix_directives=0;