fix test suite after bestlink change
parent
58ce89355f
commit
01c0f533de
|
@ -11,11 +11,11 @@ sub test ($$$) {
|
||||||
my @existing_pages=@{shift()};
|
my @existing_pages=@{shift()};
|
||||||
|
|
||||||
%IkiWiki::pagecase=();
|
%IkiWiki::pagecase=();
|
||||||
%links=();
|
%pagesources=();
|
||||||
$IkiWiki::config{userdir}="foouserdir";
|
$IkiWiki::config{userdir}="foouserdir";
|
||||||
foreach my $page (@existing_pages) {
|
foreach my $page (@existing_pages) {
|
||||||
$IkiWiki::pagecase{lc $page}=$page;
|
$IkiWiki::pagecase{lc $page}=$page;
|
||||||
$links{$page}=[];
|
$pagesources{$page}="$page.mdwn";
|
||||||
}
|
}
|
||||||
|
|
||||||
return bestlink($page, $link);
|
return bestlink($page, $link);
|
||||||
|
|
|
@ -49,9 +49,13 @@ $links{"bugs/foo"}=[qw{bugs/done}];
|
||||||
$links{"bugs/done"}=[];
|
$links{"bugs/done"}=[];
|
||||||
$links{"bugs/bar"}=[qw{done}];
|
$links{"bugs/bar"}=[qw{done}];
|
||||||
$links{"done"}=[];
|
$links{"done"}=[];
|
||||||
|
$links{"done"}=[];
|
||||||
$links{"examples/softwaresite/bugs/fails_to_frobnicate"}=[qw{done}];
|
$links{"examples/softwaresite/bugs/fails_to_frobnicate"}=[qw{done}];
|
||||||
$links{"examples/softwaresite/bugs/done"}=[];
|
$links{"examples/softwaresite/bugs/done"}=[];
|
||||||
$links{"ook"}=[qw{/blog/tags/foo}];
|
$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(bar)"), "link");
|
||||||
ok(pagespec_match("foo", "link(ba?)"), "glob link");
|
ok(pagespec_match("foo", "link(ba?)"), "glob link");
|
||||||
|
|
Loading…
Reference in New Issue