}
}
}
- else {
- $deptype=$DEPEND_CONTENT;
- }
+ $deptype=$DEPEND_CONTENT unless $deptype;
if ($simple) {
$depends_simple{$page}{lc $pagespec} |= $deptype;
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 85;
+use Test::More tests => 88;
BEGIN { use_ok("IkiWiki"); }
%config=IkiWiki::defaultconfig();
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)));