diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-07 19:40:44 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-07 19:59:26 -0400 |
commit | c72fda7d695142cc29ac986125234140f6414d97 (patch) | |
tree | 179c34e7b570a7f0ce5480457135e054c828b379 /t | |
parent | d1061d0094febfc21957554655a8eff4663b00ca (diff) |
make success and failreason objects carry an influences hash
The hash will be used used to record a set of pages that influenced the
result of a pagespec match.
The influences are merged together when boolean and/or are encountered
in a pagespec. That means using a non-short-circuiting OR operator. And
so I use & and | when translating pagespecs, since those bitwise operators
can be overloaded. ("and" and "or" cannot, apparently).
Diffstat (limited to 't')
-rwxr-xr-x | t/pagespec_match.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/pagespec_match.t b/t/pagespec_match.t index 64408f489..a1fcba7c8 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 54; +use Test::More tests => 56; BEGIN { use_ok("IkiWiki"); } @@ -88,3 +88,7 @@ ok(! pagespec_match("foo", "no_such_function(foo)"), "foo"); my $ret=pagespec_match("foo", "(invalid"); ok(! $ret, "syntax error"); ok($ret =~ /syntax error/, "error message"); + +my $ret=pagespec_match("foo", "bar or foo"); +ok($ret, "simple match"); +is($ret, "foo matches foo", "stringified return"); |