fix test suite after bestlink change
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 30 Nov 2009 23:05:47 +0000 (18:05 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 30 Nov 2009 23:05:47 +0000 (18:05 -0500)
t/bestlink.t
t/pagespec_match.t

index 033b80d742c2f425259a2fe9ddf93546e1daf0bf..0020a05e2ea9bc70a090fe069c1450899ca5caac 100755 (executable)
@@ -11,11 +11,11 @@ sub test ($$$) {
        my @existing_pages=@{shift()};
        
        %IkiWiki::pagecase=();
-       %links=();
+       %pagesources=();
        $IkiWiki::config{userdir}="foouserdir";
        foreach my $page (@existing_pages) {
                $IkiWiki::pagecase{lc $page}=$page;
-               $links{$page}=[];
+               $pagesources{$page}="$page.mdwn";
        }
 
        return bestlink($page, $link);
index d529106f751ab90a60a63074aab0e418fe36af7d..b96947407b44838a39ade2dd89cd90b6788bd3f3 100755 (executable)
@@ -49,9 +49,13 @@ $links{"bugs/foo"}=[qw{bugs/done}];
 $links{"bugs/done"}=[];
 $links{"bugs/bar"}=[qw{done}];
 $links{"done"}=[];
+$links{"done"}=[];
 $links{"examples/softwaresite/bugs/fails_to_frobnicate"}=[qw{done}];
 $links{"examples/softwaresite/bugs/done"}=[];
 $links{"ook"}=[qw{/blog/tags/foo}];
+foreach my $p (keys %links) {
+       $pagesources{$p}="$p.mdwn";
+}
 
 ok(pagespec_match("foo", "link(bar)"), "link");
 ok(pagespec_match("foo", "link(ba?)"), "glob link");