aboutsummaryrefslogtreecommitdiff
path: root/t/add_depends.t
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-06 19:07:52 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-06 19:07:52 -0400
commit7a8b492bcce45123cef45ebe6f97cd70b38b9db7 (patch)
tree7598e259fb141db33e80e04cb7feb68c9c5f9e0b /t/add_depends.t
parente45e23a7f1018e1639b1ce1fdec1b2319050641d (diff)
downloadikiwiki-7a8b492bcce45123cef45ebe6f97cd70b38b9db7.tar
ikiwiki-7a8b492bcce45123cef45ebe6f97cd70b38b9db7.tar.gz
add_depends should default to content dependencies if unknown type specified
Diffstat (limited to 't/add_depends.t')
-rwxr-xr-xt/add_depends.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/add_depends.t b/t/add_depends.t
index 68429b24a..2d686a17d 100755
--- a/t/add_depends.t
+++ b/t/add_depends.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 85;
+use Test::More tests => 88;
BEGIN { use_ok("IkiWiki"); }
%config=IkiWiki::defaultconfig();
@@ -85,3 +85,8 @@ foreach my $spec ("index or (backlink(index) and !*.png)", "backlink(foo)") {
ok($IkiWiki::depends{foo7}{$spec} & $IkiWiki::DEPEND_LINKS);
ok(! ($IkiWiki::depends{foo7}{$spec} & $IkiWiki::DEPEND_PRESENCE));
}
+
+# content is the default if unknown types are entered
+ok(add_depends("foo8", "*", presenCe => 1));
+ok($IkiWiki::depends{foo8}{"*"} & $IkiWiki::DEPEND_CONTENT);
+ok(! ($IkiWiki::depends{foo8}{"*"} & ($IkiWiki::DEPEND_PRESENCE | $IkiWiki::DEPEND_LINKS)));