+ ok($IkiWiki::depends_simple{foo3}{foo} != $IkiWiki::DEPEND_LINKS);
+ %IkiWiki::depends_simple=();
+ %IkiWiki::depends=();
+}
+# Above we tested that a link pagespec is influenced
+# by the pages that currently contain the link.
+
+# Oppositely, a pagespec that tests for pages that do not have a link
+# is not influenced by pages that currently contain the link, but
+# is instead influenced by pages that currently do not (but that
+# could be changed to have it).
+foreach my $spec ("* and !link(bar)", "* and !(!(!link(bar)))") {
+ pagespec_match_list("foo2", $spec);
+ ok($IkiWiki::depends_simple{foo2}{foo2} != $IkiWiki::DEPEND_LINKS);
+ ok($IkiWiki::depends_simple{foo2}{foo} == $IkiWiki::DEPEND_LINKS);