]> sipb.mit.edu Git - ikiwiki.git/commitdiff
more influences tests
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 8 Oct 2009 00:35:26 +0000 (20:35 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 8 Oct 2009 00:35:26 +0000 (20:35 -0400)
t/pagespec_match.t

index f73bfdfe142e9608f9cd29be9bcc962e57dd58a4..1a0db1cef025f4caccba468491ffed086db53d7e 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use warnings;
 use strict;
-use Test::More tests => 61;
+use Test::More tests => 64;
 
 BEGIN { use_ok("IkiWiki"); }
 
@@ -103,3 +103,9 @@ $ret=pagespec_match("bar", "created_before(foo)");
 is(join(",", $ret->influences), 'foo', "created_before is influenced by the comparison page");
 $ret=pagespec_match("bar", "created_after(foo)");
 is(join(",", $ret->influences), 'foo', "created_after is influenced by the comparison page");
+$ret=pagespec_match("bar", "link(quux) and created_after(foo)");
+is(join(",", sort $ret->influences), 'foo,quux', "influences add up over AND");
+$ret=pagespec_match("bar", "link(quux) and created_after(foo)");
+is(join(",", sort $ret->influences), 'foo,quux', "influences add up over OR");
+$ret=pagespec_match("bar", "!link(quux) and !created_after(foo)");
+is(join(",", sort $ret->influences), 'foo,quux', "influences unaffected by negation");