projects
/
ikiwiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[ikiwiki.git]
/
t
/
parentlinks.t
diff --git
a/t/parentlinks.t
b/t/parentlinks.t
index 74871cfa8f7766fc7cbe10d6b596cd31e659caf0..9b46549038c12b8bc86c316cf7cb3369ded0f77d 100755
(executable)
--- a/
t/parentlinks.t
+++ b/
t/parentlinks.t
@@
-1,6
+1,6
@@
#!/usr/bin/perl
# -*- cperl-indent-level: 8; -*-
#!/usr/bin/perl
# -*- cperl-indent-level: 8; -*-
-# Testcases for the Ikiwiki p
edigree
plugin.
+# Testcases for the Ikiwiki p
arentlinks
plugin.
use warnings;
use strict;
use warnings;
use strict;
@@
-14,15
+14,13
@@
BEGIN { use_ok("IkiWiki"); }
%config=IkiWiki::defaultconfig();
$config{srcdir}=$config{destdir}="/dev/null";
$config{underlaydir}="underlays/basewiki";
%config=IkiWiki::defaultconfig();
$config{srcdir}=$config{destdir}="/dev/null";
$config{underlaydir}="underlays/basewiki";
-$config{templatedir}="t/p
edigree
/templates";
+$config{templatedir}="t/p
arentlinks
/templates";
IkiWiki::loadplugins();
IkiWiki::checkconfig();
IkiWiki::loadplugins();
IkiWiki::checkconfig();
-ok(IkiWiki::loadplugin("pedigree"), "pedigree plugin loaded");
# Test data
# Test data
-$expected{'p
edigree
'} =
+$expected{'p
arentlinks
'} =
{
{
- "" => [],
"ikiwiki" => [],
"ikiwiki/pagespec" =>
[ {depth => 0, height => 2, },
"ikiwiki" => [],
"ikiwiki/pagespec" =>
[ {depth => 0, height => 2, },
@@
-42,7
+40,7
@@
sub test_loop($$) {
my $template;
my %params;
my $template;
my %params;
- ok($template=template('p
edigree
.tmpl'), "template created");
+ ok($template=template('p
arentlinks
.tmpl'), "template created");
ok($params{template}=$template, "params populated");
while ((my $page, my $exp) = each %{$expected}) {
ok($params{template}=$template, "params populated");
while ((my $page, my $exp) = each %{$expected}) {
@@
-53,7
+51,7
@@
sub test_loop($$) {
# manually run the plugin hook
$params{page}=$page;
$template->clear_params();
# manually run the plugin hook
$params{page}=$page;
$template->clear_params();
- IkiWiki::Plugin::p
edigree
::pagetemplate(%params);
+ IkiWiki::Plugin::p
arentlinks
::pagetemplate(%params);
my $res=$template->param($loop);
is(scalar(@$res), $pagedepth, "$msgprefix: path length");
my $res=$template->param($loop);
is(scalar(@$res), $pagedepth, "$msgprefix: path length");
@@
-80,4
+78,4
@@
sub test_loop($$) {
}
# Main
}
# Main
-test_loop('p
edigree', $expected{'pedigree
'});
+test_loop('p
arentlinks', $expected{'parentlinks
'});