Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into debian-jessie-backports
[git.ikiwiki.info.git]
/
t
/
index.t
diff --git
a/t/index.t
b/t/index.t
index 44273059dcad28262b35c788bfe22f00690e8947..3f4b7d9b19a39286ddac71d8024efed8248b9037 100755
(executable)
--- a/
t/index.t
+++ b/
t/index.t
@@
-38,8
+38,6
@@
$depends{"bar"}={"foo*" => 1};
$depends{"bar.png"}={};
$pagestate{"bar"}{meta}{title}="a page about bar";
$pagestate{"bar"}{meta}{moo}="mooooo";
$depends{"bar.png"}={};
$pagestate{"bar"}{meta}{title}="a page about bar";
$pagestate{"bar"}{meta}{moo}="mooooo";
-# only loaded plugins save state, so this should not be saved out
-$pagestate{"bar"}{nosuchplugin}{moo}="mooooo";
ok(saveindex(), "save index");
ok(-s "$config{wikistatedir}/indexdb", "index file created");
ok(saveindex(), "save index");
ok(-s "$config{wikistatedir}/indexdb", "index file created");
@@
-117,11
+115,14
@@
is_deeply(\%oldtypedlinks, {
%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks=
%destsources=%renderedfiles=%pagecase=%pagestate=();
%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks=
%destsources=%renderedfiles=%pagecase=%pagestate=();
-# When state is loaded for a wiki rebuild, only ctime
and oldrenderedfiles
-# are retained.
+# When state is loaded for a wiki rebuild, only ctime
, oldrenderedfiles,
+# a
nd pagesources a
re retained.
$config{rebuild}=1;
ok(loadindex(), "load index");
is_deeply(\%pagesources, {
$config{rebuild}=1;
ok(loadindex(), "load index");
is_deeply(\%pagesources, {
+ Foo => "Foo.mdwn",
+ bar => "bar.mdwn",
+ "bar.png" => "bar.png",
}, "%pagesources loaded correctly");
is_deeply(\%pagemtime, {
}, "%pagemtime loaded correctly");
}, "%pagesources loaded correctly");
is_deeply(\%pagemtime, {
}, "%pagemtime loaded correctly");
@@
-143,7
+144,10
@@
is_deeply(\%depends, {
}, "%depends loaded correctly");
is_deeply(\%pagestate, {
}, "%pagestate loaded correctly");
}, "%depends loaded correctly");
is_deeply(\%pagestate, {
}, "%pagestate loaded correctly");
-is_deeply(\%pagecase, {
+is_deeply(\%pagecase, { # generated implicitly since pagesources is loaded
+ foo => "Foo",
+ bar => "bar",
+ "bar.png" => "bar.png"
}, "%pagecase generated correctly");
is_deeply(\%destsources, {
}, "%destsources generated correctly");
}, "%pagecase generated correctly");
is_deeply(\%destsources, {
}, "%destsources generated correctly");