aboutsummaryrefslogtreecommitdiff
path: root/t/add_depends.t
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-09 14:05:22 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-09 14:05:22 -0400
commit9eb229bfc73066e5d12d5a199c77f63d5881dfb7 (patch)
treee162241bc1585a6e41a8d5c2e7ee79259f5d3e46 /t/add_depends.t
parentc5e237c0135e28f3399830abcbdae844d3006a84 (diff)
downloadikiwiki-9eb229bfc73066e5d12d5a199c77f63d5881dfb7.tar
ikiwiki-9eb229bfc73066e5d12d5a199c77f63d5881dfb7.tar.gz
move influence tests to pagespec_match_list.t
Diffstat (limited to 't/add_depends.t')
-rwxr-xr-xt/add_depends.t36
1 files changed, 0 insertions, 36 deletions
diff --git a/t/add_depends.t b/t/add_depends.t
index fce7a76c6..e3f0b6603 100755
--- a/t/add_depends.t
+++ b/t/add_depends.t
@@ -56,42 +56,6 @@ ok(add_depends("foo0", "bar", deptype("links"))); # had only content before
ok($IkiWiki::depends{foo0}{"*"} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_LINKS));
ok(! ($IkiWiki::depends{foo0}{"*"} & $IkiWiki::DEPEND_PRESENCE));
-# Adding a pagespec that requires page metadata should add the influence
-# as an explicit dependency. In the case of a link, a links dependency.
-$links{foo0}=$links{foo9}=[qw{bar baz}];
-foreach my $spec ("* and ! link(bar)", "* or link(bar)") {
- ok(add_depends("foo3", $spec, deptype("presence")));
- ok($IkiWiki::depends{foo3}{$spec} & $IkiWiki::DEPEND_PRESENCE);
- ok(! ($IkiWiki::depends{foo3}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_LINKS)));
- ok($IkiWiki::depends_simple{foo3}{foo3} == $IkiWiki::DEPEND_LINKS);
- ok(add_depends("foo4", $spec, deptype("links")));
- ok($IkiWiki::depends{foo4}{$spec} & $IkiWiki::DEPEND_LINKS);
- ok(! ($IkiWiki::depends{foo4}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_PRESENCE)));
- ok($IkiWiki::depends_simple{foo4}{foo4} == $IkiWiki::DEPEND_LINKS);
-}
-
-# a pagespec with backlinks() will add as an influence the page with the links
-$links{foo0}=[qw{foo5 foo7}];
-foreach my $spec ("bugs or (backlink(foo0) and !*.png)", "backlink(foo)") {
- ok(add_depends("foo5", $spec, deptype("presence")));
- ok($IkiWiki::depends{foo5}{$spec} & $IkiWiki::DEPEND_PRESENCE);
- ok(! ($IkiWiki::depends{foo5}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_LINKS)));
- ok($IkiWiki::depends_simple{foo5}{foo0} == $IkiWiki::DEPEND_LINKS);
- ok(add_depends("foo6", $spec, deptype("links")));
- ok($IkiWiki::depends{foo6}{$spec} & $IkiWiki::DEPEND_LINKS);
- ok(! ($IkiWiki::depends{foo6}{$spec} & ($IkiWiki::DEPEND_PRESENCE | $IkiWiki::DEPEND_CONTENT)));
- ok($IkiWiki::depends_simple{foo5}{foo0} == $IkiWiki::DEPEND_LINKS);
- ok(add_depends("foo7", $spec, deptype("presence", "links")));
- ok($IkiWiki::depends{foo7}{$spec} & $IkiWiki::DEPEND_PRESENCE);
- ok($IkiWiki::depends{foo7}{$spec} & $IkiWiki::DEPEND_LINKS);
- ok(! ($IkiWiki::depends{foo7}{$spec} & $IkiWiki::DEPEND_CONTENT));
- ok($IkiWiki::depends_simple{foo7}{foo0} == $IkiWiki::DEPEND_LINKS);
- ok(add_depends("foo8", $spec));
- ok($IkiWiki::depends{foo8}{$spec} & $IkiWiki::DEPEND_CONTENT);
- ok(! ($IkiWiki::depends{foo8}{$spec} & ($IkiWiki::DEPEND_PRESENCE | $IkiWiki::DEPEND_LINKS)));
- ok($IkiWiki::depends_simple{foo8}{foo0} == $IkiWiki::DEPEND_LINKS);
-}
-
# content is the default if unknown types are entered
ok(add_depends("foo9", "*", deptype("monkey")));
ok($IkiWiki::depends{foo9}{"*"} & $IkiWiki::DEPEND_CONTENT);