fix test suite after bestlink change

master
Joey Hess 2009-11-30 18:05:47 -05:00
parent 58ce89355f
commit 01c0f533de
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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");